Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
At present I have a Perl cgi script which acts as a server and accepts incoming HTTP POST
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
PUT /pups_00034326714e2364_21.7z HTTP/1.1 Cache-Control: no-store Connection: close Expect: 100-continue Host: test033S2121 User-Agent: curl/7.7.3 (i686-pc-linux-gnu) libcurl 7.7.3 (OpenSSL 0.9. +6) Content-Length: 190626 Content-Range: bytes1024-*/* Content-Type: application/x-7z-compressed

In reply to Handling incoming HTTP PUT - RESUME (partial content) in cgi by chanakya

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-16 11:07 GMT
Find Nodes?
    Voting Booth?

    No recent polls found