in reply to partial content download in mod perl 2

It looks like you're just trying to serve the pdf.
$r->content_type('application/pdf'); my $output = do { open my $pdf, $file or die "$file: $!"; binmode $pdf; local $/; <$pdf> }; # Return the page $r->header_out( 'Content-Length' => length($output) ); $r->send_http_header; $r->print($output); return OK;

Replies are listed 'Best First'.
Re^2: partial content download in mod perl 2
by gcw (Novice) on Mar 22, 2011 at 14:24 UTC

    I have no problems serving the PDF but I want the code to be in mod perl 2 since we are now using Apache 2. Thanks for responding..