aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2018-04-14 19:22:33 +0200
committerLars Ingebrigtsen2018-04-14 19:22:33 +0200
commitee89dea0e8da6a7dc6321d19f1ec3443b2c2465a (patch)
tree1324f113aab753a4ced2ac4688cc86a125566e17
parent950a9b0f240a7ca63533296626bb746a4a4930b2 (diff)
downloademacs-scratch/with-fetched-url.tar.gz
emacs-scratch/with-fetched-url.zip
Fix 302 redirectscratch/with-fetched-url
* lisp/url/with-url.el (with-url--process-reply): Get 302 redirect method right.
-rw-r--r--lisp/url/with-url.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/url/with-url.el b/lisp/url/with-url.el
index 32b9f288880..b83accceeca 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."
597 ;; Redirects. 597 ;; Redirects.
598 ((<= 300 code 399) 598 ((<= 300 code 399)
599 (cl-incf (url-request-redirect-times req)) 599 (cl-incf (url-request-redirect-times req))
600 (when (memq code '(302 307))
601 (setf (url-request-method req) 'get))
600 (cond 602 (cond
601 ((not (url-request-follow-redirects req)) 603 ((not (url-request-follow-redirects req))
602 (with-url--callback process '(200 "Redirect not followed"))) 604 (with-url--callback process '(200 "Redirect not followed")))