emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105417: * url-http.el (url-http-pars


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105417: * url-http.el (url-http-parse-headers): For HTTP 301/302/307, don't convert to a GET request.
Date: Sun, 07 Aug 2011 13:48:11 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105417
fixes bug(s): http://debbugs.gnu.org/701
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-08-07 13:48:11 -0400
message:
  * url-http.el (url-http-parse-headers): For HTTP 301/302/307, don't convert 
to a GET request.
modified:
  lisp/url/ChangeLog
  lisp/url/url-http.el
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2011-07-13 14:12:06 +0000
+++ b/lisp/url/ChangeLog        2011-08-07 17:48:11 +0000
@@ -1,3 +1,8 @@
+2011-08-07  Chong Yidong  <address@hidden>
+
+       * url-http.el (url-http-parse-headers): For HTTP 301/302/307,
+       don't convert to a GET request (Bug#701).
+
 2011-07-13  Chris Newton  <address@hidden>  (tiny change)
 
        * url-http.el (url-http): Copy over `url-show-status' to the async

=== modified file 'lisp/url/url-http.el'
--- a/lisp/url/url-http.el      2011-07-13 14:12:06 +0000
+++ b/lisp/url/url-http.el      2011-08-07 17:48:11 +0000
@@ -563,16 +563,8 @@
            ;; automatically redirect the request unless it can be
            ;; confirmed by the user, since this might change the
            ;; conditions under which the request was issued.
-           (if (member url-http-method '("HEAD" "GET"))
-               ;; Automatic redirection is ok
-               nil
-             ;; It is just too big of a pain in the ass to get this
-             ;; prompt all the time.  We will just silently lose our
-             ;; data and convert to a GET method.
-             (url-http-debug "Converting `%s' request to `GET' because of 
REDIRECT(%d)"
-                             url-http-method url-http-response-status)
-             (setq url-http-method "GET"
-                   url-http-data nil)))
+           (unless (member url-http-method '("HEAD" "GET"))
+             (setq redirect-uri 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


reply via email to

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