I'm not sure, but from your description, it sounds as if CGI.pm fits the bill.
If you want to be able to let your users instruct your program to fetch a URL, I guess that LWPx::ParanoidAgent is the thing to use, as it's paranoid not to trust the content and connection to be well-behaved.
| [reply] |
CGI.pm is great for Apache CGI scripts, but not sure if that will work with an IO::Socket server
Also, I am not instructing the server to go fetch a URL. Rather, what I am doing is allowing the user to upload a file to the server and provide the URL they want it stored under. Then, if any other user requests the URL from the proxy, the proxy will server the file the original user uploaded. This will give users the ability to upload files to the proxy server such as: Their resume and store it under http://resumebank.company/joe_smith.doc
or something like that. This is a test thing rather than a production piece. Well aware users might put the wrong extension on things. Once this is all figured out, I will write a piece to make sure they get the extension right.
Thanks.
| [reply] |
It sounds to me as if you're not implementing a "proxy server" but simply a small HTTP server. Then, on the receiving side, CGI.pm would be what you want, potentially coupled with HTTP::Server::Simple, or, as a more advanced solution, any of the other HTTP server implementations in Perl.
| [reply] |
As Corion++ has pointed out, you can use CGI. I suppose the primary alternative is to impliment RFC 1867 yourself.
| [reply] |
Thank you one and all for the feedback you have provided. I ended up adding an RFC 1867 decoder-like capability to my proxy system prior to reading rowdog's feedback. It made me happy to see someone recommended to try that, too. I focused on collecting all of the input from the user's browser (file + header + content information) and broke it down from there. A very important part is the "boundary=" information provided from the browser. Once you identify this information (and have collected it all), you can break it down by using the "boundary" value as the separator.
Thanks again.
| [reply] |