aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-09-10 21:06:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-09-10 21:06:50 +0000
commit7ff4b4f2b5871900d27f5640f71c41858727fc77 (patch)
treef4552c3722e81cef33996e40ad7b13f96b7d0c3d /lib/cookie.c
parent945feafe25b97bdf0d91f49c5452608d66f2e047 (diff)
- Claes Jakobsson fixed a problem with cookie expiry dates at exctly the epoch
start second "Thu Jan 1 00:00:00 GMT 1970" as the date parser then returns 0 which internally then is treated as a session cookie. That particular date is now made to get the value of 1.
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 16b2fdd72..5188f6b0a 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -365,6 +365,12 @@ Curl_cookie_add(struct SessionHandle *data,
get parsed for whatever reason. This will have the effect that
the cookie won't match. */
co->expires = curl_getdate(what, &now);
+
+ /* Session cookies have expires set to 0 so if we get that back
+ from the date parser let's add a second to make it a
+ non-session cookie */
+ if (co->expires == 0)
+ co->expires = 1;
}
else if(!co->name) {
co->name = strdup(name);