cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: http session cookies

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 12 Nov 2010 12:27:22 +0100 (CET)

On Fri, 12 Nov 2010, Arunkumar Manickam wrote:

> I have multiple instances of my application running which use libcurl for
> doing HTTP. They all share the same cookie jar file.

That sounds like a failure waiting to happen... libcurl does no locking.

> Is there a way I can read back the session cookies of an http transaction
> into memory.

You can do pretty much anything you like in the cookie area with
CURLINFO_COOKIELIST and CURLOPT_COOKIELIST.

> Or Is It possible to tell curl to store session cookies and permanent
> cookies in different files.

No. The storing of cookies to a file is rather basic and simple - and the
saving is also only ever done when the handle holding the cookie jar is
closed. If you need more specialized beavior you need to make that yourself
using the APIs I mentioned above.

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