From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmKRV-00033v-GM for guix-patches@gnu.org; Mon, 28 Aug 2017 09:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmKRS-0005IP-Aw for guix-patches@gnu.org; Mon, 28 Aug 2017 09:51:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50281) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmKRS-0005ID-7P for guix-patches@gnu.org; Mon, 28 Aug 2017 09:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmKRS-00052t-0D for guix-patches@gnu.org; Mon, 28 Aug 2017 09:51:02 -0400 Subject: [bug#28262] [PATCH] Handle the same HTTP redirects everywhere. Resent-Message-ID: From: Tobias Geerinckx-Rice References: <20170828134610.30984-1-me@tobias.gr> Message-ID: <92edb6ea-1ba3-4fe2-d64e-ebf487c0bbb9@tobias.gr> Date: Mon, 28 Aug 2017 15:52:06 +0200 MIME-Version: 1.0 In-Reply-To: <20170828134610.30984-1-me@tobias.gr> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28262@debbugs.gnu.org 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