in reply to mod_perl handler inside apache 1.x serving partial content - is this possible? How?

It turned out that setting status to 206 before call of $r->send_http_header solved the problem. Here is a fixed version of code:
my $range_request = ($mod_perl::VERSION < 1.99) ? $r->set_byte +range : 0; if((my $status = $r->meets_conditions) eq OK()) { if ($mod_perl::VERSION < 1.99) { if ($range_request) { $r->status(206); }; $r->send_http_header; }; } else { return $status; } return OK() if $r->header_only; if($range_request) { while(my($offset, $length) = $r->each_byterange) { $r->print(substr($contents, $offset, $length)) +; } } else { $r->print($contents); } return OK();
  • Comment on Re: mod_perl handler inside apache 1.x serving partial content - is this possible? How?
  • Download Code