]> sjero.net Git - wget/commitdiff
[svn] Would discard cookies with unparsable expiry time.
authorhniksic <devnull@localhost>
Tue, 23 Jan 2007 21:46:38 +0000 (13:46 -0800)
committerhniksic <devnull@localhost>
Tue, 23 Jan 2007 21:46:38 +0000 (13:46 -0800)
src/ChangeLog
src/cookies.c

index bf9e16eea76657957f390b141ef335ecfb86ef3b..a3ca569248a4f89c6f29bcea4ed86e6083a5e26a 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * cookies.c (parse_set_cookie): Would erroneously discard cookies
+       with unparsable expiry time.
+
 2007-01-23  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * progress.c (create_image): Check for ETA overflow.
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"))
        {