aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAndreas Schwab2004-11-30 21:32:35 +0000
committerAndreas Schwab2004-11-30 21:32:35 +0000
commitcacfe88b03bd2e8538e8cf12c77b2f9c230c5302 (patch)
treec77a212ce4f6ac582068d811b226599606ef21e2 /lisp
parent9dbee55ed124e780a7795e5edc31454b01d0120f (diff)
downloademacs-cacfe88b03bd2e8538e8cf12c77b2f9c230c5302.tar.gz
emacs-cacfe88b03bd2e8538e8cf12c77b2f9c230c5302.zip
(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'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/url/ChangeLog7
-rw-r--r--lisp/url/url-http.el11
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 7a527f943e3..c9663baff8f 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,10 @@
12004-11-30 Paul Pogonyshev <pogonyshev@gmx.net>
2
3 * url-http.el (url-http-handle-cookies): Bind `url-current-object'
4 to `url-http-cookies-sources' so that cookies are attributed to
5 proper domain.
6 (url-http): Make local variable `url-http-cookies-sources'.
7
12004-11-28 Andreas Schwab <schwab@suse.de> 82004-11-28 Andreas Schwab <schwab@suse.de>
2 9
3 * url-http.el (url-http-create-request): Don't add newline after 10 * url-http.el (url-http-create-request): Don't add newline after
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a3fd54e3cba..8a7269e6bea 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -342,7 +342,8 @@ This allows us to use `mail-fetch-field', etc."
342The buffer must already be narrowed to the headers, so mail-fetch-field will 342The buffer must already be narrowed to the headers, so mail-fetch-field will
343work correctly." 343work correctly."
344 (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t)) 344 (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t))
345 (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))) 345 (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))
346 (url-current-object url-http-cookies-sources))
346 (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies))) 347 (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies)))
347 (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2))) 348 (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2)))
348 (while cookies 349 (while cookies
@@ -1043,7 +1044,8 @@ CBARGS as the arguments."
1043 url-http-process 1044 url-http-process
1044 url-http-method 1045 url-http-method
1045 url-http-extra-headers 1046 url-http-extra-headers
1046 url-http-data)) 1047 url-http-data
1048 url-http-cookies-sources))
1047 (set (make-local-variable var) nil)) 1049 (set (make-local-variable var) nil))
1048 1050
1049 (setq url-http-method (or url-request-method "GET") 1051 (setq url-http-method (or url-request-method "GET")
@@ -1055,7 +1057,10 @@ CBARGS as the arguments."
1055 url-http-chunked-counter 0 1057 url-http-chunked-counter 0
1056 url-callback-function callback 1058 url-callback-function callback
1057 url-callback-arguments cbargs 1059 url-callback-arguments cbargs
1058 url-http-after-change-function 'url-http-wait-for-headers-change-function) 1060 url-http-after-change-function 'url-http-wait-for-headers-change-function
1061 url-http-cookies-sources (if (boundp 'proxy-object)
1062 proxy-object
1063 url-current-object))
1059 1064
1060 (set-process-buffer connection buffer) 1065 (set-process-buffer connection buffer)
1061 (set-process-sentinel connection 'url-http-end-of-document-sentinel) 1066 (set-process-sentinel connection 'url-http-end-of-document-sentinel)