cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: COOKIEJAR & COOKIEFILE & modifying outgoing cookies

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 17 Mar 2005 10:27:11 +0100 (CET)

On Thu, 17 Mar 2005, Dave wrote:

> If I pass an array of headers into CURLOPT_HTTPHEADER do I have to pass
> every header I will need for the request or will it append my headers to the
> current request, or change matching headers to my headers.

You pass the headers you want to add, remove or replace. libcurl will provide
its own set unless you replace/remove them.

Described for libcurl here:

    http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTHTTPHEADER

> If I can clobber the outgoing Cookie: I will effectively have modified what
> I needed to.

You can also set your own cookie header with CURLOPT_COOKIE.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-03-17