Greetings once again!
I am faced with a slight problem, that I don't know how to attack. I need direct access to the client's socket after an HTTP request to an apache server. Let me explain further what I mean:
A client (not a web-browser, a script of some sort), opens up a connection to port 80 on some box where I have apache running, and then it requests a resource. This is part of the problem, as I don't know whether POST, or PUT would be most reasonable (and I can guarantee you that finding examples of PUT handling CGI scripts are *not* easy...) So, it executes a command along the lines of:
POST (or PUT) http://server/cgi-bin/my-script.cgi HTTP/1.1
The fact of the matter is that the ?????'s are being dynamically generated by the client over a potentially long time, so I would like for the server to be in some sort of read loop, handing chunks to the CGI script for partial processing. Just reading from standard in isn't cutting the mustard, nor is doing a multi-part file upload, as it seems like Apache wants to verify the completeness of the entire HTTP request before it passes it off to a handler...
So, oh great knowledgable monks... how do I handle a situation such as this? Is there a way in mod_perl or even normal CGI to get the "data" in some sort of request (POST, PUT, whatever...) before it's been totally completed? And on another note, if anyone has access to a PUT cgi that actually works, I'd be curious to see it...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||