emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

url-cookie.el: A cookie's localpart must not be nil


From: Klaus Straubinger
Subject: url-cookie.el: A cookie's localpart must not be nil
Date: Fri, 20 Oct 2006 14:39:28 +0200 (CEST)

Some internet sites try to set cookies without specifying any local
part (e.g., "http://www.rad-net.de/";). The function
url-cookie-handle-set-cookie then calls url-cookie-store with nil as
its argument LOCALPART. But when this cookie is read again in function
url-cookie-retrieve, an error "Wrong type argument: stringp, nil"
occurs because it is expected to be a string.

My proposal is to make this tiny change:

--- url-cookie.el.orig  2006-09-07 08:49:14.000000000 +0200
+++ url-cookie.el       2006-10-20 14:16:53.000000000 +0200
@@ -361,7 +361,8 @@
         (expires (cdr-safe (assoc-ignore-case "expires" args)))
         (localpart (or (cdr-safe (assoc-ignore-case "path" args))
                        (file-name-directory
-                        (url-filename url-current-object))))
+                        (url-filename url-current-object))
+                       ""))
         (rest nil))
     (while args
       (if (not (member (downcase (car (car args)))

-- 
Klaus Straubinger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]