Geoffrey Young wrote:


Andy Grundman wrote:


I am writing a secure download ResponseHandler that sends a file to the
user.  I have simple sends working fine with sendfile($filename) but I
also need to handle 206 Partial Content as the files I'm dealing with
are big and may need to be resumed.


byteserving in apache 2.0 is handled by the byterange output filter, similar
to the way it handles Content-Length, chunked encoding, etc, regardless of
who is generating the content.  I'm very surprised you need to deal with
byteserving on your own - did you issue a Range request and Apache didn't
respond with a partial response?

So, even if I am writing my own content out using sendfile, Apache will start it at the correct spot when it gets a Range request? How does it do that...run my output up until the correct byte then start sending it out to the client? I assumed I had to handle it myself.



$r->headers_out->set('Content-Length' => $size);


don't do that - use $r->set_content_length()

Cool. I actually thought the $len variable of sendfile would handle this for me, but it didn't appear to do anything.


--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to