cURL / Mailing Lists / curl-library / Single Mail

curl-library

Sharing cookies file (CURLOPT_COOKIEJAR+CURLOPT_COOKIEFILE) between processes

From: GLAYAL, Laurent <laurent.glayal_at_sfr.com>
Date: Fri, 14 Nov 2014 12:34:38 +0000

Hi,

I' using libcurl (7.34.0) and CURLOPT_COOKIEJAR and CURLOPT_COOKIFILE to read/store cookies to a file.
I have a bunch of questions on using libcurl sharing the same cookies file.

My first questions are about the concept of 'browser session' when using libcurl :
Does libcurl store cookies without 'expires' direction in the cookies file ?
 Such cookies are supposed to expire at browser' session end, but when does a 'session' end when using libcurl ?

My second question is about cookies file locking in the same and between processes :
I would like to share cookies file between parallel requests not only in the same process but between processes, I've found no flock() in libcurl code to share cookie file between processes,
is it possible to use a callback over curl_easy API to manage this file lock everytime a handle is trying to load or store data to this file ?
My code is using curl_easy API and performs a new handle creation for each request.

Thanks for your help.
Regards.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-14