cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] Use magic expiration value for session cookies

From: Claes Jakobsson <claes_at_versed.se>
Date: Wed, 2 Sep 2009 23:45:39 +0200

Hi,

curl currently treats cookies whose internal expiration = 0 as session
cookies. However this cases a problem when a server sets a cookie with
the expiration date of 1970-01-01 00:00:00 which is epoch 0.

The supplied patch changes session cookies to have expiration value
-0x00C0FFEE so that epoch 0 works as expected. Attached is also a new
testcase for it.

Another thing I've noticed is that the dumper that writes cookies to a
file includes session cookies. Is this really wanted?

/Claes

  • application/octet-stream attachment: test565
Received on 2009-09-02