I have a client for whom I manage documents, some of which are in pdf format. The documents are not in the web tree, and are served based on custom access etc., and some are encrypted on the files system. I am successfully do all this, and ultimately use send_fd to send the file(s). The client has noticed that through the managed process, the time to view the pdf is longer than viewing the same file through the default handler.
I have discovered that this is most likely due to the fact that Apache is byteserving the file, allowing the first page to be viewed even though the complete file has not been downloaded. The complete time to download between the default handler and my handler are quite close, but the document comes up for partial view much quicker with the default handler. I have been able to use Apache::File to modify my handler to recognize when a byteserving request has come in ( using ap_set_byterange), and access the ap_each_byterange call to decode the header. However, it does not seem like the ap_send_fd_length is mod_perl accessible. Is there any issue with adding access to this API function? Also, will I have a problem setting the PARTIAL_CONTENT response? With the clients encrypted documents, I have the documents in memory only. I would like to use the send_fb/send_fb_length call in a similar fashion. I haven't done any XS/guts type programming, so I'm hoping this will be a relatively simple task. Thanks for any pointers, Tom Murphy