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 09:27:43 +0100 (CET)

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