[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e6c4a02 3/4: Treat 302 redirects as if they were 30
[Emacs-diffs] master e6c4a02 3/4: Treat 302 redirects as if they were 303 redirects
Thu, 12 Apr 2018 20:24:07 -0400 (EDT)
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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).
lisp/url/url-http.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index aed0efa..e2d7a50 100644
@@ -623,6 +623,12 @@ should be shown to the user."
;; We do not support agent-driven negotiation, so we just
;; redirect to the preferred URI if one is provided.
+ (`found ; 302
+ ;; 302 Found was ambiguously defined in the standards, but
+ ;; it's now recommended that it's treated like 303 instead
+ ;; of 307, since that's what most servers expect.
+ (setq url-http-method "GET"
+ url-http-data nil))
(`see-other ; 303
;; The response to the request can be found under a different
;; URI and SHOULD be retrieved using a GET method on that