I've got an interesting problem for you LWP guys out there. A certain part of the script I'm writing involves uploading a file to a website via form upload. Normally this wouldn't be that much of a problem, but it's the way that the website decided to go about it that's causing the problem. For some reason, a command to their script must be placed in the URL, and the rest through the normal POST methods for the file upload to work correctly. Here is the HTML:
<form name="UploadPage" action="www.page.com/app?cmd=upload" method="P
+OST" enctype="multipart/form-data">
This of course works fine in the bowser, but as you guessed it, doesn't work in LWP. Once executed, the website gave me an error with regards to an incorrect byte count. I can only assume that LWP is ignoring the: cmd=upload command in the URL, and not taking it into account or something. Since this does use the POST method, that's understandable. I think just adding the extra bytes to the header count would solve the problem, I'm not sure though. Either way, I'm not experienced enough in using LWP to manipulate the HTTP Headers module in such a fine way. I'd appreciate any input. Thanks.
-Tim
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.