aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2018-04-13 02:21:30 +0200
committerLars Ingebrigtsen2018-04-13 02:21:30 +0200
commite6c4a0298eb66e9a9dacd67f9b9a13d8aae97c49 (patch)
tree0499e018f1b6e9941bf3b947a5bb5600e949de7e
parent45c4c03f0d55b4bcca499ca6d55a4ebbcd47bbf9 (diff)
downloademacs-e6c4a0298eb66e9a9dacd67f9b9a13d8aae97c49.tar.gz
emacs-e6c4a0298eb66e9a9dacd67f9b9a13d8aae97c49.zip
Treat 302 redirects as if they were 303 redirects
* lisp/url/url-http.el (url-http-parse-headers): Treat 302 as 303, since this is what the standards recommend these days (bug#25703). See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
-rw-r--r--lisp/url/url-http.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index aed0efab01a..e2d7a50e29c 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -623,6 +623,12 @@ should be shown to the user."
623 ;; We do not support agent-driven negotiation, so we just 623 ;; We do not support agent-driven negotiation, so we just
624 ;; redirect to the preferred URI if one is provided. 624 ;; redirect to the preferred URI if one is provided.
625 nil) 625 nil)
626 (`found ; 302
627 ;; 302 Found was ambiguously defined in the standards, but
628 ;; it's now recommended that it's treated like 303 instead
629 ;; of 307, since that's what most servers expect.
630 (setq url-http-method "GET"
631 url-http-data nil))
626 (`see-other ; 303 632 (`see-other ; 303
627 ;; The response to the request can be found under a different 633 ;; The response to the request can be found under a different
628 ;; URI and SHOULD be retrieved using a GET method on that 634 ;; URI and SHOULD be retrieved using a GET method on that