]> sjero.net Git - wget/blobdiff - src/cookies.c
[svn] Merge of fix for bugs 20341 and 20410.
[wget] / src / cookies.c
index e173c5bc381d6fb41193aa8b7b9d9c1059a5ef00..4f7d2ac39a1282a18cd93d5d75e64286c265a83e 100644 (file)
@@ -5,7 +5,7 @@ This file is part of GNU Wget.
 
 GNU Wget is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at
+the Free Software Foundation; either version 3 of the License, or (at
 your option) any later version.
 
 GNU Wget is distributed in the hope that it will be useful, but
@@ -14,8 +14,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with Wget; if not, write to the Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+along with Wget.  If not, see <http://www.gnu.org/licenses/>.
 
 In addition, as a special exception, the Free Software Foundation
 gives permission to link the code of its release of Wget with the
@@ -390,17 +389,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"))
        {