|Pathologically Eclectic Rubbish Lister|
Handling incoming HTTP PUT - RESUME (partial content) in cgiby chanakya (Friar)
|on Aug 23, 2010 at 05:33 UTC||Need Help??|
chanakya has asked for the wisdom of the Perl Monks concerning the following question:
At present I have a Perl cgi script
requests from various clients. The cgi checks the headers for "POST" request and then reads in the data
and writes out the data in a file (this file is created as yyyymmddhhmmss.processid) at a specified location.
Now, I had to extend the cgi to also support HTTP PUT RESUME (partial content) functionality.
What this means is, the clients sending the data to the cgi will stop/terminate
the connection after a specified number of bytes.
The client can resume the partial PUT request at a later point of time, the clients will do so
until the complete data/attachment is transferred.
I have already read the rfc-2616 document regarding the "partial content" PUT.
Basically, I'm looking for suggestions on implementing the "partial content"
(a.k.a HTTP PUT RESUME ) functionality into the cgi.
Here are some of the points i've been trying to address:
* How and where do I store the partial PUT request data
* How to uniquely identify the resumed requests from the clients and completely
process the request from a given client.
* Can any of the Apache module or mod_perl help me in solving the issues.
* What settings changes need to be done in Apache.
Does anyone has sample code or suggestions about how to go about the above.
Below are the headers that I'll be receiving from the client