cURL / Mailing Lists / curl-library / Single Mail


Re: getting/setting cookies

From: Daniel Stenberg <>
Date: Sat, 18 Dec 2004 11:53:25 +0100 (CET)

On Fri, 17 Dec 2004, Linus Nielsen Feltzing wrote:

> I'd also like a way to get a single cookie by name.

I just think the API turned out quite complicated when starting to think in
those terms. Or do you have any suggestion on how it would work?

> I'm not sure about the "expired" method, because I want to be able to change
> a cookie value without having to change the expire date

With my suggested method, you'd just clone the whole string with the cookie
data libcurl returned to you, then you'd replace the contents in the string
with your own set and send back that whole string to libcurl.

> which could be invalid when the cookie was received (like on AOL, where the
> expire date is set by a javascript function).

libcurl currently keep all cookies in memory, including expired ones. The
expired ones are just never sent to any server.

Thinking about it, this behaviour may need to be changed in the future.

      Daniel Stenberg -- --
       Dedicated custom curl help for hire:
Received on 2004-12-18