* url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543).
authorChong Yidong <cyd@stupidchicken.com>
Sat, 4 Dec 2010 22:41:41 +0000 (17:41 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 4 Dec 2010 22:41:41 +0000 (17:41 -0500)
Suggested by Lennart Borgman.

lisp/url/ChangeLog
lisp/url/url-cookie.el

index 90533fa..8fdd340 100644 (file)
@@ -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.
index 2067f09..dc7566c 100644 (file)
@@ -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)