cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: POST and headers

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 30 Mar 2001 08:29:30 +0200 (MET DST)

On Thu, 29 Mar 2001, Garrett Rooney wrote:

> (please CC me on any replies, as i do not subscribe to this mailing list)
>
> I don't know if this is possible, as no way to do it was imediately
> obvious from the documentation, but is there a way to make libcurl send
> an http (https actually, but that doesn't really matter at the moment)
> POST without causing it to insert extra headers? right now, when i set
> the CURLOPT_POST option it inserts the following headers:
>
> Pragma: no-cache
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
> Content-Type: application/x-www-form-urlencoded

Short answer: yes.

> I don't want the pragma or accept headers at all, although i can live
> with sending them, but the Content-Type is the real problem. I've
> overridden the Content-Type header myself, with a CURLOPT_HTTPHEADER
> option, and i need it to be set to something other than
> application/x-www-form-urlencoded. is there anything i can do to change
> this behavior?

Yes, replace the internal ones with empty new ones. Like "Pragma:" and
"Accept:".

I should document this in the CURLOPT_HTTPHEADER section!

> (for the curious, i'm using curl to impliment xmlrpc over https, and i
> seem to be getting messed up because the server is expecting a text/xml
> content type, and curl is sending application/x-www-form-urlencoded.)

I hope this helps. Otherwise, just let me know.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-03-30