Hi all, I am trying to partially download a PDF with the following mod perl 2 code but I keep on getting a 200 response rather than a 206 response.
sub send{ my ($r) = @_; my $file = "/tmp/out.pdf"; my $file_size = = -s $file; my $attach_name = basename($file); $r->headers_out->set('Accept-Ranges' => 'bytes'); $r->headers_out->set('Content-Disposition' => "inline; filename=\"$a +ttach_name\""); $r->set_content_length($file_size); $r->content_type('application/pdf'); unless ((my $status = $r->meets_conditions) == OK) { return $status; } $r->sendfile($file); return OK; }
If the "Accept Ranges" is present doesn't Apache 2 send the proper headers so that the download is a partial download? Thanks a bunch for any replies!!
In reply to partial content download in mod perl 2 by gcw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |