curl-users
Re: Multipart/mixed from Config File
Date: Fri, 19 Mar 2010 16:41:06 +0100 (CET)
On Fri, 19 Mar 2010, Jan.Lacok_at_farrow.com wrote:
> This will be a preferred solution for us (to construct the entire thing
> and send it with -d).
--data-binary is probably better for you. You want the newlines etc preserved.
and you want to provide the proper Content-Type: header with -H too, which
then needs to include the correct boundary that you use in the file.
> - To construct it ourselves do we need to url-encode every line, every
> string.
No. Multipart formposts never URL-encode anything. The fact that you insist on
having one part url-encoded is a very rare thing. In fact I've not ever seen
it "live".
> - I have tried with url-encoding CR/LF at the end of each line as %0D%0A
> but it didn't work.
That's completely wrong, unless you want to actually pass on content that is
exactly the combination of bytes '%' '0' 'D' etc...
-- / 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 2010-03-19