cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cookies

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 7 Jul 2005 23:35:30 +0200 (CEST)

On Thu, 7 Jul 2005, Arvind Sachdeva wrote:

>> The shared object can then surive an easy handle and it can be shared
>> between multiple easy handles, even simultaneously from multiple threads if
>> you just set and use the lock/unlock callbacks properly.
>
> I am at present using share interface for cookies. Let us take a situation,
> say I create an easy handle, I set the a cookie C1 on it, and accessed url
> U1, I am done with this download. Now after a few moments, I realize that I
> need to access the same URL. I created a new easy_handle, enabled cookies
> and accessed the U1. Now do I need to set C1 again ?

It would depend on what you did with the shared object in between these two
requests. If you re-use the same shared object (with cookies) the second time,
then the cookie would of course still be kept around in it.

> Can share interface insure that once I set Cookie Ci for a URL Ui, I dont
> need to set that again in different easy handles which are accessing the
> same URL Ui.

If you make all those requests use this shared object, yes.

> I am using curl version 7.11.1.

Consider upgrading. We've done lots since then!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-07-07