summaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2017-08-28 15:46:10 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2017-09-05 20:57:13 +0200
commit57d28987722cb6b830fae212ea0d6a704580ff9c (patch)
treea759ac2148dadeb3a4acb72c99651746f9ba8eb1 /guix/scripts/lint.scm
parenta4c1e99ed95c5032f8e6201fb7bcf1692f9c92c8 (diff)
downloadguix-patches-57d28987722cb6b830fae212ea0d6a704580ff9c.tar
guix-patches-57d28987722cb6b830fae212ea0d6a704580ff9c.tar.gz
Handle the same HTTP redirects everywhere.
* guix/build/download.scm (http-fetch): Complete the hard-coded list of HTTP redirection status codes. * guix/http-client.scm (http-fetch): Likewise. * guix/scripts/lint.scm (probe-uri): Likewise.
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r--guix/scripts/lint.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index aceafc674d..57bbeec465 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -411,7 +412,11 @@ for connections to complete; when TIMEOUT is #f, wait as long as needed."
(close-connection port))))
(case (response-code response)
- ((301 302 307)
+ ((301 ; moved permanently
+ 302 ; found (redirection)
+ 303 ; see other
+ 307 ; temporary redirection
+ 308) ; permanent redirection
(let ((location (response-location response)))
(if (or (not location) (member location visited))
(values 'http-response response)