cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Custom http headers don't work

From: Scott <sideburnz17_at_hotmail.com>
Date: Mon, 12 Jan 2009 21:43:44 +0000 (UTC)

Dan Fandrich <dan <at> coneharvesters.com> writes:

>
> curl_slist_append returns an important pointer that this code ignores--a
> pointer to the new list. Look at the example in the man page.
>
> >>> Dan

d'oh! I knew it was going to be something dumb that I forgot.
It works in my Post wrapper because before going through a similar loop,
I issue an append the right way:

requestHeader = curl_slist_append( requestHeader,
   "Content-Type: application/x-www-form-urlencoded" );

...so it looks like the append function does something different depending on
whether the curl_slist* is NULL or not. (which is valid)

In any event, thanks for your help!

-Scott
Received on 2009-01-12