cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cookie interface suggestion

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 24 Jun 2003 00:05:20 +0200 (CEST)

On Fri, 20 Jun 2003, Cris Bailiff wrote:

> > I think the one-by-one approach makes more sense, as that allows the
> > application to decide how/if/where each cookie is stored and also exactly
> > which cookies that are sent back to libcurl at a later time. If it wants
> > to.
>
> I can deal either way, but I'd still like libcurl to make the decision on
> whether the cookie applies for a request (i.e. I'd want to pass all the
> cookies I have back in, one-by-one if necessary, and have libcurl use the
> ones which are correct for this request).

Yeps. You can then extract all cookies and keep them around, and then pass
them to a specific libcurl easy instance by using ADD to add them all.

That would simply add the cookies into the libcurl cookie "database" and it
would then figure out by itself which cookies that should be sent off or not
in subsequent requests.

The "opaque lump" style feels more specialized and since it can be done using
this existing suggestion, I'd rather have you solve your problem this way.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Received on 2003-06-24