]> sjero.net Git - wget/blobdiff - src/cookies.c
[svn] Would discard cookies with unparsable expiry time.
[wget] / src / cookies.c
index e173c5bc381d6fb41193aa8b7b9d9c1059a5ef00..ccc93f9e06833e04cc712304f66455b26f13d9a2 100644 (file)
@@ -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"))
        {