mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-25 15:52:01 -07:00
* lisp/url/url-cookie.el (url-cookie-expired-p): Tweak previous change.
This commit is contained in:
parent
966bb6c005
commit
c4ae64d106
2 changed files with 9 additions and 8 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2010-09-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* url-cookie.el (url-cookie-expired-p): Tweak previous change.
|
||||
|
||||
2010-09-09 shawn boles <shawn.boles@gmail.com> (tiny change)
|
||||
|
||||
* url-cookie.el (url-cookie-expired-p): Simplify and fix. (Bug#6957)
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue