cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with the cookie jar

From: aniket ray <aniket.ray_at_gmail.com>
Date: Fri, 18 Jan 2008 17:07:21 +0530

Hi all,

I'm facing a problem with libcurl's cookiejar interface and hope that
someone would be able to help me out.

I am writing 2 different cookies with the same name and domain but different
paths. The problem is that at the next request one of the cookies is getting
deleted from the cookie jar.
Let us say the domain = abc.com, path = /xyz/ c1=hello
and the other cookie is something like domain = abc.com, path = /pqr/ and
c1 = bye

I manually checked and at one point both cookies are present physically in
the file. But at the next curl_easy request the second cookie is getting
deleted from the jar.

What I wanted to know is - Is this a bug? Or do the specs say that each
domain can have only a unique cookie name. I tried it on some full fledged
browsers and they seem to be storing both the cookies.
Is there any workaround, so that cookies with different paths are not
deleted at the next request.

Thanks a lot in advance,
Aniket Ray
Received on 2008-01-18