aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-08-07 13:48:11 -0400
committerChong Yidong2011-08-07 13:48:11 -0400
commit98fdd2b837df46c77527bdd73a7eeb055eb60fa4 (patch)
tree8e4a9233a52ffe6ec91db132476e1a557dd7ec2a
parent75bfc66716a6c33ca89be28457c1df991170bb83 (diff)
downloademacs-98fdd2b837df46c77527bdd73a7eeb055eb60fa4.tar.gz
emacs-98fdd2b837df46c77527bdd73a7eeb055eb60fa4.zip
* url-http.el (url-http-parse-headers): For HTTP 301/302/307, don't convert to a GET request.
Fixes: debbugs:701
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-http.el12
2 files changed, 7 insertions, 10 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 6a3638c4232..5714179fcfe 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12011-08-07 Chong Yidong <cyd@stupidchicken.com>
2
3 * url-http.el (url-http-parse-headers): For HTTP 301/302/307,
4 don't convert to a GET request (Bug#701).
5
12011-07-13 Chris Newton <redshodan@gmail.com> (tiny change) 62011-07-13 Chris Newton <redshodan@gmail.com> (tiny change)
2 7
3 * url-http.el (url-http): Copy over `url-show-status' to the async 8 * url-http.el (url-http): Copy over `url-show-status' to the async
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index def35449397..a21aed21436 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -563,16 +563,8 @@ should be shown to the user."
563 ;; automatically redirect the request unless it can be 563 ;; automatically redirect the request unless it can be
564 ;; confirmed by the user, since this might change the 564 ;; confirmed by the user, since this might change the
565 ;; conditions under which the request was issued. 565 ;; conditions under which the request was issued.
566 (if (member url-http-method '("HEAD" "GET")) 566 (unless (member url-http-method '("HEAD" "GET"))
567 ;; Automatic redirection is ok 567 (setq redirect-uri nil)))
568 nil
569 ;; It is just too big of a pain in the ass to get this
570 ;; prompt all the time. We will just silently lose our
571 ;; data and convert to a GET method.
572 (url-http-debug "Converting `%s' request to `GET' because of REDIRECT(%d)"
573 url-http-method url-http-response-status)
574 (setq url-http-method "GET"
575 url-http-data nil)))
576 (see-other ; 303 568 (see-other ; 303
577 ;; The response to the request can be found under a different 569 ;; The response to the request can be found under a different
578 ;; URI and SHOULD be retrieved using a GET method on that 570 ;; URI and SHOULD be retrieved using a GET method on that