mirror of
https://github.com/moparisthebest/curl
synced 2024-12-25 01:28:51 -05:00
cookies: expire "Max-Age=0" immediately
Reported-by: Jeroen Ooms Fixes #3351 Closes #3352
This commit is contained in:
parent
d997aa0e96
commit
1e9abfedfa
@ -675,7 +675,10 @@ Curl_cookie_add(struct Curl_easy *data,
|
|||||||
/* overflow, used max value */
|
/* overflow, used max value */
|
||||||
co->expires = CURL_OFF_T_MAX;
|
co->expires = CURL_OFF_T_MAX;
|
||||||
else if(!offt) {
|
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 */
|
/* would overflow */
|
||||||
co->expires = CURL_OFF_T_MAX;
|
co->expires = CURL_OFF_T_MAX;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user