diff options
| author | Andreas Schwab | 2004-11-30 21:32:35 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2004-11-30 21:32:35 +0000 |
| commit | cacfe88b03bd2e8538e8cf12c77b2f9c230c5302 (patch) | |
| tree | c77a212ce4f6ac582068d811b226599606ef21e2 /lisp | |
| parent | 9dbee55ed124e780a7795e5edc31454b01d0120f (diff) | |
| download | emacs-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/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 11 |
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 @@ | |||
| 1 | 2004-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 | |||
| 1 | 2004-11-28 Andreas Schwab <schwab@suse.de> | 8 | 2004-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." | |||
| 342 | The buffer must already be narrowed to the headers, so mail-fetch-field will | 342 | The buffer must already be narrowed to the headers, so mail-fetch-field will |
| 343 | work correctly." | 343 | work 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) |