# HG changeset patch # User Andreas Schwab # Date 1101850338 0 # Node ID 2d413ef5bfec1c4b1ca005774a949ec112e7afca # Parent a8237f2462a3f1088c10966b4f65da0a240e83fd (url-http-handle-cookies): Bind `url-current-object' to `url-http-cookies-sources' so that cookies are attributed to proper domain. (url-http): Make local variable `url-http-cookies-sources'. diff -r a8237f2462a3 -r 2d413ef5bfec lisp/url/url-http.el --- a/lisp/url/url-http.el Tue Nov 30 17:54:55 2004 +0000 +++ b/lisp/url/url-http.el Tue Nov 30 21:32:18 2004 +0000 @@ -342,7 +342,8 @@ The buffer must already be narrowed to the headers, so mail-fetch-field will work correctly." (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t)) - (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))) + (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t)) + (url-current-object url-http-cookies-sources)) (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies))) (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2))) (while cookies @@ -1043,7 +1044,8 @@ url-http-process url-http-method url-http-extra-headers - url-http-data)) + url-http-data + url-http-cookies-sources)) (set (make-local-variable var) nil)) (setq url-http-method (or url-request-method "GET") @@ -1055,7 +1057,10 @@ url-http-chunked-counter 0 url-callback-function callback url-callback-arguments cbargs - url-http-after-change-function 'url-http-wait-for-headers-change-function) + url-http-after-change-function 'url-http-wait-for-headers-change-function + url-http-cookies-sources (if (boundp 'proxy-object) + proxy-object + url-current-object)) (set-process-buffer connection buffer) (set-process-sentinel connection 'url-http-end-of-document-sentinel)