Thanks for the feedback...
I am looking for the client side
HTTP::Request::Common works OK for small files, but I need a solution that can handle very large files (100 MB+). I can upload very large files using a web browser (Netscape and IE). LWP seems to "slurp" the file before writing it to the Content-Disposition section of the HTTP message, thus causing memory woes on the client - this is also very slow. I am looking for some client side Perl that opens a socket and generates the appropriate HTTP to upload any file - no matter the size - here is an example of a very small text file:
POST /cgi-bin/upload.pl HTTP/1.1
Accept: application/vnd.ms-excel, application/msword, application/vnd.
+ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, a
+pplication/pdf, */*
Referer: http://deville/cgi-bin/upload.pl
Accept-Language: en-us
Content-Type: multipart/form-data; boundary=--------------------------
+-7d03135102b8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
Host: deville
Content-Length: 316
Connection: Keep-Alive
-----------------------------7d03135102b8
Content-Disposition: form-data; name="file"; filename="D:\hess\dev\www
+\notes\hello.txt"
Content-Type: text/plain
Hello there
-----------------------------7d03135102b8
Content-Disposition: form-data; name="done"
done
-----------------------------7d03135102b8--
This is an actual header that I sniffed coming from IE 5 on Win NT. I cannot seem to reproduce this header - even hardcoded - to upload t
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.