cURL / Mailing Lists / curl-users / Single Mail

curl-users

HTTP multipart/mixed POST - Problem with Content-Lengths

From: Richard Breuer <richard.breuer_at_gmx.de>
Date: Wed, 13 Jul 2011 15:20:34 +0200

Dear all,

I have a problem getting access to a website and found no solution in the web so far. I use CURL to send two files to a server, which requires Content-Length values for each, according to the server docs. I use the this command line:

curl --digest -u <user>:<pwd> -k --header "Content-Type: multipart/mixed" --header "MIME-version: 1.0" --form "fileupload=@script\sample.xml;type=text/xml" --form "fileupload=@audio\test.wav;type=audio/wav" --trace-ascii h.txt -A Test https://<theserver>

When I look into the trace, I notice that only the Content-Types have been filled but not Content-Length. Consequently, the server says

"The Content-Length MIME header was missing or has an invalid value"

Can anyone help me getting CURL to either (a) determine and send the Content-Length of an uploaded file or (b) accept the values that I compute myself (which would also be possible).

Thanks!
    Ricki

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-13