curl-library
[ curl-Bugs-940841 ] Cookies handling SetCookie : samename; SetCookie : samename
Date: Fri, 23 Apr 2004 09:16:06 -0700
Bugs item #940841, was opened at 2004-04-23 09:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=940841&group_id=976
Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: Cookies handling SetCookie : samename; SetCookie : samename
Initial Comment:
curl doesn't write cookies in the cookie file when
this situation happens :
two Set-Cookie fields defines identical cookies
in the same http header.
example :
<?php
$cookie_file_path
= 'C:/DOCUMENTROOT/test.txt';
$LOGINURL = "http://signin.ebay.fr/aw-
cgi/eBayISAPI.dll?SignIn";
$agent = "Mozilla/5.0 (Windows; U; Windows
NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
(ax)";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_USERAGENT,
$agent);
curl_setopt($ch, CURLOPT_COOKIEJAR,
$cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEFILE,
$cookie_file_path);
$result = curl_exec ($ch);
curl_close ($ch);
print $result;
?>
the http header looks like this :
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Fri, 23 Apr 2004 16:11:34 GMT
IISExport: This web site was exported using IIS Export
v2.2
Content-Type: text/html
Set-Cookie: secure_ticket=n; path=/; domain=.ebay.fr;
secure
Set-Cookie: ebaysignin=; path=/; domain=.ebay.fr
Set-Cookie: secure_ticket_l2=n; path=/;
domain=.ebay.fr; secure
Set-Cookie: sru=X; path=/; domain=.ebay.fr;
expires=Fri, 01-Sep-1995 00:00:00 GMT
Set-Cookie:
s=AQAAAAEAAAASAAAAOwAAADZAiUC2epJAMXRlc3RDb29
raWUgJDIkTW96aWxsYS8kTlk0dEFlbG1JY3U0NHdxcjBuLzR
pLwDNzc3Ng; path=/; domain=.ebay.fr
Set-Cookie: sru=X; path=/; domain=.ebay.fr;
expires=Fri, 01-Sep-1995 00:00:00 GMT
Set-Cookie:
s=AQAAAAEAAAASAAAAOwAAADZAiUC2epJAMXRlc3RDb29
raWUgJDIkTW96aWxsYS8kTlk0dEFlbG1JY3U0NHdxcjBuLzR
pLwDNzc3Ng; path=/; domain=.ebay.fr
My configuration :
Apache 2.0.48 / PHP 4.3.4 / curl 7.11.1 win32
through mod-curl.
it writes the cookies properly in other normal situations.
I admit sending two identical cookies is a strange idea,
but i'm not responsible for ibč stupidity.
kapouer_at_netcourrier.com
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=940841&group_id=976
Received on 2004-04-23