From: Nicolas Petton Date: Thu, 4 Feb 2016 20:43:42 +0000 (+0100) Subject: Do not ignore redirections of 301, 302 and 307 status codes X-Git-Tag: emacs-26.0.90~2738 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46dfdd831b817ef9e281350043bd4231f2dc5acc;p=emacs.git Do not ignore redirections of 301, 302 and 307 status codes The current version of HTTP/1.1 (RFC 7231) no longer requires confirmation on 301, 302 or 307 status codes, therefore we do not have to ignore redirects for other requests than GET and HEAD. * lisp/url/url-http.el (url-http-parse-headers): Do not ignore 301, 302 and 307 redirects for other requests than GET and HEAD. --- diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 222dbc64d68..d49e527fe4b 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -590,15 +590,7 @@ 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. nil) - ((or `moved-permanently `found `temporary-redirect) ; 301 302 307 - ;; If the 301|302 status code is received in response to a - ;; request other than GET or HEAD, the user agent MUST NOT - ;; automatically redirect the request unless it can be - ;; confirmed by the user, since this might change the - ;; conditions under which the request was issued. - (unless (member url-http-method '("HEAD" "GET")) - (setq redirect-uri nil))) - (`see-other ; 303 + (`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 ;; resource.