Changeset 872

Show
Ignore:
Timestamp:
05/31/06 18:26:19
Author:
miyagawa
Message:

fix URI::Fetch status handling so as to handle redirect pages as well

Files:

Legend:

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

    r844 r872  
    111111    # NoNetwork: don't connect for 3 hours 
    112112    my $res = $self->{ua}->fetch( $args->{entry}->permalink, $self, { NoNetwork => 60 * 60 * 3 } ); 
    113     return if $res->status != URI::Fetch::URI_OK && $res->is_error; 
     113    return if !$res->status && $res->is_error; 
    114114 
    115115    $args->{content} = decode_content($res); 
  • trunk/plagger/lib/Plagger/Plugin/Filter/FindEnclosures.pm

    r864 r872  
    164164    my $ua  = Plagger::UserAgent->new; 
    165165    my $res = $ua->fetch($url, $self, { NoNetwork => 3 * 60 * 60 }); 
    166     return if $res->status != URI::Fetch::URI_OK && $res->is_error; 
     166    return if !$res->status && $res->is_error; 
    167167 
    168168    return decode_content($res);