cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cookies

From: Arvind Sachdeva <asachdeva_at_gmail.com>
Date: Fri, 8 Jul 2005 15:01:22 +0530

> 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.

I am afraid i am observing that the cookie which I had set using
curl_easy_setopt is not sent again automatically for the second
handle. I am attaching the code as well as logs. I might have missed
something. Please note that there is no cookie sent in second request.
But If reuse the same handle then cookie is sent in every subsequent
request. Thats what I meant by cookie handle association. I believe,
by design cookie should be associated to url not handle.

-Arvind Sachdeva.

[native70_at_phaedrus foobar]$ ./a.out
* About to connect() to www.html-kit.com port 80
* Connected to www.html-kit.com (64.45.232.90) port 80
> GET /tools/cookietester/ HTTP/1.1
Cookie: TestCookie_NameXXX;TestCookie_valueYYY
Host: www.html-kit.com
Pragma: no-cache
Accept: */*

< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Date: Fri, 08 Jul 2005 08:55:28 GMT
< Server: Apache
< Content-Length: 6505
< Content-Type: text/html;charset=ISO-8859-1
* Connection #0 left intact
* Closing connection #0
* About to connect() to www.html-kit.com port 80
* Connected to www.html-kit.com (64.45.232.90) port 80
> GET /tools/cookietester/ HTTP/1.1
Host: www.html-kit.com
Pragma: no-cache
Accept: */*

< HTTP/1.1 200 OK
< Connection: Keep-Alive
< Date: Fri, 08 Jul 2005 08:55:43 GMT
< Server: Apache
< Content-Length: 5948
< Content-Type: text/html;charset=ISO-8859-1
* Connection #0 left intact
* Closing connection #0

Received on 2005-07-08