emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 46dfdd8: Do not ignore redirections of 301, 302 and


From: Nicolas Petton
Subject: [Emacs-diffs] master 46dfdd8: Do not ignore redirections of 301, 302 and 307 status codes
Date: Thu, 04 Feb 2016 21:19:49 +0000

branch: master
commit 46dfdd831b817ef9e281350043bd4231f2dc5acc
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>

    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.
---
 lisp/url/url-http.el |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 222dbc6..d49e527 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]