diff options
| author | Chong Yidong | 2007-04-01 15:39:13 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-04-01 15:39:13 +0000 |
| commit | 8c33dc1375ce0ea35cfa70fe43f9709d6494bab2 (patch) | |
| tree | c0f2e987ea9a20ddaf5b9eaf77ae986f21e262a8 | |
| parent | b4ddc815b77785e93fd6a0654888da2ea63d647b (diff) | |
| download | emacs-8c33dc1375ce0ea35cfa70fe43f9709d6494bab2.tar.gz emacs-8c33dc1375ce0ea35cfa70fe43f9709d6494bab2.zip | |
(url-http-handle-cookies): Reverse list returned by
`mail-fetch-field', so that cookies are set in the correct order.
| -rw-r--r-- | lisp/url/url-http.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index d83c827a6fb..10a6f2e7278 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -381,8 +381,8 @@ This allows us to use `mail-fetch-field', etc." | |||
| 381 | "Handle all set-cookie / set-cookie2 headers in an HTTP response. | 381 | "Handle all set-cookie / set-cookie2 headers in an HTTP response. |
| 382 | The buffer must already be narrowed to the headers, so `mail-fetch-field' will | 382 | The buffer must already be narrowed to the headers, so `mail-fetch-field' will |
| 383 | work correctly." | 383 | work correctly." |
| 384 | (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t)) | 384 | (let ((cookies (nreverse (mail-fetch-field "Set-Cookie" nil nil t))) |
| 385 | (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))) | 385 | (cookies2 (nreverse (mail-fetch-field "Set-Cookie2" nil nil t)))) |
| 386 | (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies))) | 386 | (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies))) |
| 387 | (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2))) | 387 | (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2))) |
| 388 | (while cookies | 388 | (while cookies |