From: hniksic Date: Tue, 23 Jan 2007 21:46:38 +0000 (-0800) Subject: [svn] Would discard cookies with unparsable expiry time. X-Git-Tag: v1.13~604 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=0e8788c58ccebea8c357343795e353c49580acb7 [svn] Would discard cookies with unparsable expiry time. --- diff --git a/src/ChangeLog b/src/ChangeLog index bf9e16ee..a3ca5692 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-01-23 Hrvoje Niksic + + * cookies.c (parse_set_cookie): Would erroneously discard cookies + with unparsable expiry time. + 2007-01-23 Hrvoje Niksic * progress.c (create_image): Check for ETA overflow. diff --git a/src/cookies.c b/src/cookies.c index e173c5bc..ccc93f9e 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -390,17 +390,16 @@ parse_set_cookie (const char *set_cookie, bool silent) { cookie->permanent = 1; cookie->expiry_time = expires; + /* According to netscape's specification, expiry time in + the past means that discarding of a matching cookie + is requested. */ + if (cookie->expiry_time < cookies_now) + cookie->discard_requested = 1; } else /* Error in expiration spec. Assume default (cookie doesn't expire, but valid only for this session.) */ ; - - /* According to netscape's specification, expiry time in the - past means that discarding of a matching cookie is - requested. */ - if (cookie->expiry_time < cookies_now) - cookie->discard_requested = 1; } else if (TOKEN_IS (name, "max-age")) {