diff lisp/w3/url-cookie.el @ 26:441bb1e64a06 r19-15b96

Import from CVS: tag r19-15b96
author cvs
date Mon, 13 Aug 2007 08:51:32 +0200
parents 0293115a14e9
children 1a767b41a199
line wrap: on
line diff
--- a/lisp/w3/url-cookie.el	Mon Aug 13 08:51:05 2007 +0200
+++ b/lisp/w3/url-cookie.el	Mon Aug 13 08:51:32 2007 +0200
@@ -1,7 +1,7 @@
 ;;; url-cookie.el --- Netscape Cookie support
 ;; Author: wmperry
-;; Created: 1997/01/26 00:40:23
-;; Version: 1.10
+;; Created: 1997/02/18 23:34:20
+;; Version: 1.11
 ;; Keywords: comm, data, processes, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -297,12 +297,13 @@
 	 (secure (and (assoc* "secure" args :test 'url-header-comparison) t))
 	 (domain (or (cdr-safe (assoc* "domain" args :test
 				       'url-header-comparison))
-		     url-current-server))
+		     (url-host url-current-object)))
 	 (expires (cdr-safe (assoc* "expires" args :test
 				    'url-header-comparison)))
 	 (path (or (cdr-safe (assoc* "path" args :test
 				     'url-header-comparison))
-		   (file-name-directory url-current-file)))
+		   (file-name-directory
+		    (url-filename url-current-object))))
 	 (rest nil))
     (while args
       (if (not (member (downcase (car (car args)))
@@ -330,10 +331,10 @@
      ((and url-cookie-confirmation
 	   (not (funcall url-confirmation-func
 			 (format "Allow %s to set a cookie? "
-				 url-current-server))))
+				 (url-host url-current-object)))))
       ;; user wants to be asked, and declined.
       nil)
-     ((url-cookie-host-can-set-p url-current-server domain)
+     ((url-cookie-host-can-set-p (url-host url-current-object) domain)
       ;; Cookie is accepted by the user, and passes our security checks
       (let ((cur nil))
 	(while rest
@@ -351,6 +352,6 @@
 		      (concat "%s tried to set a cookie for domain %s\n"
 			      "Permission denied - cookie rejected.\n"
 			      "Set-Cookie: %s")
-		      url-current-server domain str))))))
+		      (url-host url-current-object) domain str))))))
 
 (provide 'url-cookie)