From c4ae64d106173b3e63581a42e5ffb9ea76b5441d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Sep 2010 22:38:43 -0700 Subject: [PATCH] * lisp/url/url-cookie.el (url-cookie-expired-p): Tweak previous change. --- lisp/url/ChangeLog | 4 ++++ lisp/url/url-cookie.el | 13 +++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 0192987907c..11d48f97fbf 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,7 @@ +2010-09-09 Glenn Morris + + * url-cookie.el (url-cookie-expired-p): Tweak previous change. + 2010-09-09 shawn boles (tiny change) * url-cookie.el (url-cookie-expired-p): Simplify and fix. (Bug#6957) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 810e0e4eb58..2067f097224 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -1,7 +1,7 @@ ;;; url-cookie.el --- Netscape Cookie support -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -193,12 +193,9 @@ telling Microsoft that." (setq url-cookie-storage (list (list domain tmp)))))))) (defun url-cookie-expired-p (cookie) - "Returns true if COOKIE is expired. -If COOKIE has an expiration date it is converted to seconds, adjusted to the client timezone and then compared against (float-time)." - (let* ((exp (url-cookie-expires cookie)) - (exp-time (and exp (float-time (date-to-time exp))))) - (if (not exp) nil (> (float-time) exp-time))) - ) + "Return non-nil if COOKIE is expired." + (let ((exp (url-cookie-expires cookie))) + (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." -- 2.39.2