Changeset 1595

Show
Ignore:
Timestamp:
08/24/06 21:56:08
Author:
miyagawa
Message:

Filter::TruePermalink?: fixed bug when it tries to resolve redirection of huge file (like MP3) it gets stuck. Call die() immediately to ignore content body

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/TruePermalink.pm

    r1591 r1595  
    120120            Plagger->context->log(debug => "Issuing GET to $link to follow redirects"); 
    121121            my $ua  = Plagger::UserAgent->new; 
    122             my $res = $ua->simple_request( HTTP::Request->new(GET => $link) ); 
     122 
     123            # don't care about content body ... immediately die 
     124            my $res = $ua->simple_request( HTTP::Request->new(GET => $link), sub { die } ); 
    123125            if ($res->is_redirect) { 
    124126                return $res->header('Location');