emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/with-fetched-url ee89dea: Fix 302 redirect


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] scratch/with-fetched-url ee89dea: Fix 302 redirect
Date: Sat, 14 Apr 2018 13:22:56 -0400 (EDT)

branch: scratch/with-fetched-url
commit ee89dea0e8da6a7dc6321d19f1ec3443b2c2465a
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix 302 redirect
    
    * lisp/url/with-url.el (with-url--process-reply): Get 302 redirect
    method right.
---
 lisp/url/with-url.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/url/with-url.el b/lisp/url/with-url.el
index 32b9f28..b83accc 100644
--- a/lisp/url/with-url.el
+++ b/lisp/url/with-url.el
@@ -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")))



reply via email to

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