commit cc3ac3b7820ee986ead50480b508f17a4e2bdbff
parent 77acdcacca6c97a50c773467d73863a07f2b330c
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 6 Dec 2015 09:21:35 +0100
more redirects
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http.lisp b/http.lisp
@@ -143,8 +143,8 @@
((< (decf redirect) 0))
(multiple-value-setq (protocol code message headers2 body)
(client1 url headers))
- (if (member code '(302))
- (setq url (cdr (assoc "Location" headers2 :test #'equal))) ;; TODO update "Host" header
+ (if (member code '(301 302))
+ (setq url (cdr (assoc "Location" headers2 :test #'equalp))) ;; TODO update "Host" header
(return-from client (values protocol code message headers2 body)))))
;;(client "http://127.0.0.1:1234/")