mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:13:33 +03:00
- 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.
This commit is contained in:
parent
945feafe25
commit
7ff4b4f2b5
5 changed files with 99 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue