cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: POST and Headers

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 3 Nov 2003 17:00:09 +0100 (CET)

On Mon, 3 Nov 2003, Clayton, Richard wrote:

> If I use
> curl --data-binary "@C:\rmtestpo.xml" -u user:password --header
> CONTENT_TYPE:text/xml "https://test.banner-online.com/test.asp"

[snip]

> Is there any way of suppressing
> HTTP_CONTENT_TYPE:application/x-www-form-urlencoded

Yes, by spelling it right! ;-)

        --header "Content-Type: text/xml"

The header curl uses has a dash in the header name, not an underscore. The
fact that you get it using underscore must be some artifact of your
script/server or similar.

When you misspelled it, you just added a new header to curl's request instead
of replacing the internally generated one.

-- 
 Daniel - been obfuscating curl source code since 1998.
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
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-11-03