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

curl-and-php

Re: COOKIEJAR & COOKIEFILE & modifying outgoing cookies

From: Dave <dave_at_cc0.net>
Date: Thu, 17 Mar 2005 00:50:04 -0800

Actually I had another thought about modifying cookies...haven't tested yet
but wanted to get your input...

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.

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

-Dave

> On Thu, 17 Mar 2005, Dave wrote:
>
>> I didn't pose the issue with writing of the JAR as a question...but I am
>> curious if you have any clues as to why it may be occuring.
>>
>> Basically I want the JAR to be on disk and flushed as soon as possible so
>> I can modify, but it looks like it doesn't get written to disk until
>> another curl_init into the same PHP var clobbers the previous. I tried
>> using various setopts such as FORBID_REUSE and FRESH_CONNECT but didn't
>> seem to help.
>
> I think this is because the PHP/CURL binding does something like a delayed
> close of the libcurl handle or something. I haven't really checked the
> code to verify it, but given your description it sounds like it.
>
> libcurl itself writes the cookiejar file when the handle is closed with
> curl_easy_cleanup(). There's no delays or anything, it is simply flushed
> to disk when the handle is killed.
>
> I'm not sure this helps you very much...
>
> --
> 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