in reply to mod_perl handler inside apache 1.x serving partial content - is this possible? How?
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();
|
|---|