[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28262] [PATCH] Handle the same HTTP redirects everywhere.
From: |
Tobias Geerinckx-Rice |
Subject: |
[bug#28262] [PATCH] Handle the same HTTP redirects everywhere. |
Date: |
Mon, 28 Aug 2017 15:52:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Tobias Geerinckx-Rice wrote on 28/08/17 at 15:46:
> diff --git a/guix/http-client.scm b/guix/http-client.scm
> index 3c5441c38..8db332093 100644
> --- a/guix/http-client.scm
> +++ b/guix/http-client.scm
> @@ -259,7 +260,10 @@ Raise an '&http-get-error' condition if downloading
> fails."
> ((200)
> (values data (response-content-length resp)))
> ((301 ; moved permanently
> - 302) ; found (redirection)
> + 302 ; found (redirection)
> + 303 ; see also
> + 307 ; temporary redirect
> + 308) ; permanent redirect
s/redirect$/redirection/
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index aceafc674..b27732d39 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -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 also
> + 307 ; temporary redirect
> + 308) ; permanent redirect
> (let ((location (response-location response)))
> (if (or (not location) (member location visited))
> (values 'http-response response)
Dittums.
Kind regards,
T G-R