From 0e8788c58ccebea8c357343795e353c49580acb7 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Tue, 23 Jan 2007 13:46:38 -0800
Subject: [PATCH] [svn] Would discard cookies with unparsable expiry time.

---
 src/ChangeLog |  5 +++++
 src/cookies.c | 11 +++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

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  <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.
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"))
 	{