]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 302 redirect scratch/with-fetched-url
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 17:22:33 +0000 (19:22 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 17:22:33 +0000 (19:22 +0200)
* lisp/url/with-url.el (with-url--process-reply): Get 302 redirect
method right.

lisp/url/with-url.el

index 32b9f2888805bed87d8ed7242113d48394e210ec..b83accceecaffcce89d510aaec19d6760781107a 100644 (file)
@@ -597,6 +597,8 @@ If given, return the value in BUFFER instead."
      ;; Redirects.
      ((<= 300 code 399)
       (cl-incf (url-request-redirect-times req))
+      (when (memq code '(302 307))
+        (setf (url-request-method req) 'get))
       (cond
        ((not (url-request-follow-redirects req))
         (with-url--callback process '(200 "Redirect not followed")))