diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-12-08 17:29:55 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-12-09 18:34:55 +0100 |
commit | 1e9abfedfa7a858d89233088c503ebec4762b9fa (patch) | |
tree | 7959f07ce04ef0bd669c113c63626a5125a8fb6e | |
parent | d997aa0e963c5be5de100dccdc5208d39bd3d62b (diff) |
cookies: expire "Max-Age=0" immediately
Reported-by: Jeroen Ooms
Fixes #3351
Closes #3352
-rw-r--r-- | lib/cookie.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index d8655f790..3dc85ee5c 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -675,7 +675,10 @@ Curl_cookie_add(struct Curl_easy *data, /* overflow, used max value */ co->expires = CURL_OFF_T_MAX; else if(!offt) { - if(CURL_OFF_T_MAX - now < co->expires) + if(!co->expires) + /* already expired */ + co->expires = 1; + else if(CURL_OFF_T_MAX - now < co->expires) /* would overflow */ co->expires = CURL_OFF_T_MAX; else |