curl-library
Re: Custom http headers don't work
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 12 Jan 2009 13:27:52 -0800
Date: Mon, 12 Jan 2009 13:27:52 -0800
On Mon, Jan 12, 2009 at 08:48:29PM +0000, Scott wrote:
> I am trying to get custom headers into a GET request, but they aren't going
> through (I verified this by turning VERBOSE on). I use a similar mechanism to
> set custom headers on POST requests, and that seems to work just fine.
> Here's a snippet of the code:
> for( ; iter != i_rRequestHeaders.end(); ++iter )
> {
> curl_slist_append( requestHeader, (iter->first + ": " +
> iter->second).c_str() );
> }
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
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2009-01-12