cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Cookie database query mid-session

From: Andy Hobbs <andy_at_hobbs.uk.net>
Date: Tue, 01 Feb 2005 13:25:58 +0000

Right here goes...

I've looked back through the previous discussions and there seem to be 2
requirements:

1) Keep the API simple, providing basic cookie get/set functionality
2) Enhance the API by ADDING a specific cookie handling part to the API
that is more advanced (can be read as complex)

Since the underlying data would be the same I see no reason why both of
these can't be implemented, other than increased maintenance.

So my suggestion is to implement the following:

As per Daniels email on the 17th December 2004

curl_easy_getinfo() - CURLINFO_COOKIELIST to get a curl_slist with all
known cookies (netscape/mozilla cookie file formatted)

curl_easy_setopt() - CURLOPT_COOKIELIST to set a list of cookies (using
the same format as above or HTTP-header style - both are supported)

To remove a cookie that libcurl already knows about, you simply set it
with no contents, or you set it with an expired time.

I'm not sure how to clear all known cookies easily, or even if that is a
desired feature.

And also implement this:
http://curl.haxx.se/dev/COOKIES

thus giving both simple and advanced features to the API

Thoughts?
Andy

On Mon, 2005-01-31 at 15:06, Daniel Stenberg wrote:
> On Mon, 31 Jan 2005, Andy Hobbs wrote:
>
> > I will have a look at his and see what I can do. I've not really tried
> > delving to libcurl before so I make no promises.
>
> Um, forgot to add this:
>
> The perhaps most important work in this area is to define the API that gets
> and sets cookies. The implementation will be easy once we just agree on how
> the function(s) should work.

-- 
Andy Hobbs <andy_at_hobbs.uk.net>
Received on 2005-02-01