GNU bug report logs -
#28262
[PATCH] Handle the same HTTP redirects everywhere.
Previous Next
Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>
Date: Mon, 28 Aug 2017 13:45:02 UTC
Severity: normal
Tags: patch
Done: Tobias Geerinckx-Rice <me <at> tobias.gr>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 7 years and 255 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.