Changeset 873

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

FetchEnclosure?::Xango: keep enclosure and local_path when the response is redirected. Refs #285

Files:

Legend:

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

    r855 r873  
    125125        $url = $r->header('location'); 
    126126        return unless $url =~ m!^https?://!i; 
    127         $_[KERNEL]->post($_[HEAP]->{BROKER_ALIAS}, 'enqueue_job', Xango::Job->new(uri => URI->new($url), redirect => $redirect)); 
     127        my $new_job = Xango::Job->new( 
     128            uri => URI->new($url), 
     129            redirect => $redirect, 
     130            path => $job->notes('path'), # TODO: rewrite path with the new URL? respect Content-Disposition? 
     131            enclosure => $job->notes('enclosure'), 
     132        ); 
     133        $_[KERNEL]->post($_[HEAP]->{BROKER_ALIAS}, 'enqueue_job', $new_job); 
    128134        return; 
    129135    } else {