Changeset 2007

Show
Ignore:
Timestamp:
02/08/08 13:07:35
Author:
typester
Message:
  • added missing path rewriting for root favicon url
  • fixed imager error handling
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/fastladder-crawler/plagger/lib/Plagger/Plugin/Store/Fastladder.pm

    r2006 r2007  
    148148    unless ($icon) { 
    149149        my $icon_link = URI->new($url); 
     150        $icon_link->path('/favicon.ico'); 
     151 
    150152        my $res = $ua->fetch($icon_link); 
    151153        $icon = $res->content if $res->is_success; 
     
    154156    if ($icon) { 
    155157        my $imager = Imager->new; 
    156         unless ($imager->read( data => $icon )) { 
    157             $c->log( debug => 'image read error: ' . Imager->errstr ); 
    158             return; 
    159         } 
     158        $imager->read( data => $icon ) or return; 
    160159 
    161160        unless ($imager->getwidth == 16 and $imager->getheight == 16) {