cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POST and Headers

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 30 Oct 2003 08:54:26 +0100 (CET)

On Wed, 29 Oct 2003, Clayton, Richard wrote:

> when POSTing a file how do you stop the header getting posted with the file.

> By this I mean when I post an XML file I want the file to start with the XML
> tag rather than the four lines I get prior to it.
>
> That is:

> ------------------------------1d315e070b3e
> Content-Disposition: form-data; name="fileName"; filename="C:\rmtestpo.xml"
> Content-Type: text/plain

Those are headers put there in order to make it a proper multipart formpost.
If you don't want them, don't make it a multipart formpost!

Put simply: you want -d, not -F.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-10-30