summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-12-04 17:41:41 -0500
committerChong Yidong <cyd@stupidchicken.com>2010-12-04 17:41:41 -0500
commit37bf6ce2b49638516419b1cab86e2d891ade779e (patch)
treec85f291a8d8d4a7524e14aa43da853b7835c279d
parent11cb1e35ff74fdff80d74ee3ec6d61e74b802cea (diff)
downloademacs-37bf6ce2b49638516419b1cab86e2d891ade779e.tar.gz
* url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543).
Suggested by Lennart Borgman.
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-cookie.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 90533fa297c..8fdd340da6c 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART.
+ Suggested by Lennart Borgman (Bug#7543).
+
2010-09-18 Glenn Morris <rgm@gnu.org>
* url-cache.el (url-is-cached): Doc fix.
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 2067f097224..dc7566c6d5e 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -198,7 +198,7 @@ telling Microsoft that."
(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."
+ "Retrieve all cookies for a specified HOST and LOCALPART."
(let ((storage (if secure
(append url-cookie-secure-storage url-cookie-storage)
url-cookie-storage))
@@ -226,7 +226,8 @@ telling Microsoft that."
(setq cur (car cookies)
cookies (cdr cookies)
localpart-match (url-cookie-localpart cur))
- (if (and (if (stringp localpart-match)
+ (if (and (if (and (stringp localpart-match)
+ (stringp localpart))
(string-match (concat "^" (regexp-quote
localpart-match))
localpart)