curl-users
Re: HTTP multipart/mixed POST - Problem with Content-Lengths
Date: Wed, 13 Jul 2011 19:43:22 +0200 (CEST)
On Wed, 13 Jul 2011, Richard Breuer wrote:
> 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"
I assume you mean for each separate form part? Then yes, libcurl doesn't
insert any such header since they're not mandatory and in fact just makes
certain receivers confused.
If your server end really needs them, then I think it might be time to start
hacking on libcurl to optionally insert them or to question the server end's
sensibility in requiring them.
The other option would be to provide a way for users to properly add custom
headers to specific form parts as then you could craft and provide your own,
but that isn't supported either (yet)!
-- / daniel.haxx.se ------------------------------------------------------------------- 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.htmlReceived on 2011-07-13