cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Beaten by cahoot.com

From: Richard Cooper <Richard.Cooper_at_aprsmartlogik.com>
Date: Wed, 16 Oct 2002 17:17:04 +0100

> From: Daniel Stenberg [mailto:daniel_at_haxx.se]

> On Wed, 16 Oct 2002, Richard Cooper wrote:
>
> > Curl treats cookies with an expire time of "" as session cookies.
>
> Yes, no expire date makes it a session cookie. But no expire date gets
> translated to a 0 in the cookie files (as the expire date is
> stored as number
> of seconds since jan 1 1970), and thus cookies that are read
> from a file with
> expire date 0 are session cookies.

Sorry, I wasn't clear about "" and "0". These are as stored in the cookie
file.

If it is stored as "0" in the cookie file (as the "sesessonid" cookie is)
then -j does not treat it as a session cookie and it is sent to the server
(I think). From the verbose output:

[snip]
> GET
/servlet/com.aquarius.security.authentication.servlet.LoginEntryServlet
HTTP/1.1
User-Agent: curl/7.10.1 (i686-pc-cygwin) libcurl/7.10.1 OpenSSL/0.9.6g
zlib/1.1.4
Host: ibank.cahoot.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Cookie: sesessionid=GI5GVEFK2ZS4HUHKKGDB3PA;
Apache=212.161.86.195.191741034784380547
[snip]

If I edit the file by hand and delete the "0" then "sesessonid" is not sent
to the server. Although I now think this is because the cookie file parser
fails to read the changed line rather than because of any intervention from
-j

> > The sessionid cookie sent back from cahoot has an expire
> time of "0" and so
> > gets sent regardless of the -j setting.
>
> > I can't find what an expire time of "0" signifies anywhere.
> Anybody know?
>
> How is expire time "0" passed from the server?

-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
Received on 2002-10-16