Unverified Commit 1e9abfed authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

cookies: expire "Max-Age=0" immediately

Reported-by: Jeroen Ooms
Fixes #3351
Closes #3352
parent d997aa0e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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