GNU bug report logs - #23275
307 "Temporary Redirect" is not handled

Previous Next

Package: guix;

Reported by: Alex Kost <alezost <at> gmail.com>

Date: Tue, 12 Apr 2016 08:24:01 UTC

Severity: normal

Tags: fixed

Done: Alex Kost <alezost <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23275 in the body.
You can then email your comments to 23275 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#23275; Package guix. (Tue, 12 Apr 2016 08:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Kost <alezost <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 12 Apr 2016 08:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: 307 "Temporary Redirect" is not handled
Date: Tue, 12 Apr 2016 11:23:13 +0300
[Message part 1 (text/plain, inline)]
As discovered by Albin Söderqvist (see the commentary in his 'openttd'
patch [1]), the following command fails:

  guix download http://binaries.openttd.org/releases/1.6.0/openttd-1.6.0-source.tar.xz

with the following error:

--8<---------------cut here---------------start------------->8---
Starting download of /tmp/guix-file.sYMDJZ
From http://binaries.openttd.org/releases/1.6.0/openttd-1.6.0-source.tar.xz...
ERROR: download failed "http://binaries.openttd.org/releases/1.6.0/openttd-1.6.0-source.tar.xz" 307 "Temporary Redirect"
failed to download "/tmp/guix-file.sYMDJZ" from "http://binaries.openttd.org/releases/1.6.0/openttd-1.6.0-source.tar.xz"
guix download: error: http://binaries.openttd.org/releases/1.6.0/openttd-1.6.0-source.tar.xz: download failed
--8<---------------cut here---------------end--------------->8---

This happens because 'http-fetch' procedure from (guix build download)
module handles only 301 and 302 codes, while here we have 307 [2] [3].

The attached patch fixes this problem.

[1] http://lists.gnu.org/archive/html/guix-devel/2016-04/msg00445.html
[2] https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
[3] https://tools.ietf.org/html/rfc2616#section-10.3.8

[0001-download-Follow-HTTP-307-Temporary-Redirection.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#23275; Package guix. (Wed, 13 Apr 2016 20:36:01 GMT) Full text and rfc822 format available.

Message #8 received at 23275 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Kost <alezost <at> gmail.com>
Cc: 23275 <at> debbugs.gnu.org
Subject: Re: bug#23275: 307 "Temporary Redirect" is not handled
Date: Wed, 13 Apr 2016 22:35:07 +0200
Alex Kost <alezost <at> gmail.com> skribis:

> From d0ee21dd4e8c34e7d3f23eb69943026706d24d37 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost <at> gmail.com>
> Date: Tue, 12 Apr 2016 11:14:59 +0300
> Subject: [PATCH] download: Follow HTTP 307 "Temporary Redirection".
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Reported by Albin Söderqvist <albin <at> fripost.org>.
>
> * guix/build/download.scm (http-fetch): Follow redirections upon 307.
>   This is what 'binaries.openttd.org' does.

Sure, please push!

(Please add “Fixes …” in the commit log.)

Thanks!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#23275; Package guix. (Thu, 14 Apr 2016 08:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 23275 <at> debbugs.gnu.org (full text, mbox):

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 23275 <at> debbugs.gnu.org
Subject: Re: bug#23275: 307 "Temporary Redirect" is not handled
Date: Thu, 14 Apr 2016 11:07:10 +0300
Ludovic Courtès (2016-04-13 23:35 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> skribis:
>
>> From d0ee21dd4e8c34e7d3f23eb69943026706d24d37 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost <at> gmail.com>
>> Date: Tue, 12 Apr 2016 11:14:59 +0300
>> Subject: [PATCH] download: Follow HTTP 307 "Temporary Redirection".
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> Reported by Albin Söderqvist <albin <at> fripost.org>.
>>
>> * guix/build/download.scm (http-fetch): Follow redirections upon 307.
>>   This is what 'binaries.openttd.org' does.
>
> Sure, please push!
>
> (Please add “Fixes …” in the commit log.)

Done and committed as 82fd23b.

-- 
Alex




Added tag(s) fixed. Request was from Alex Kost <alezost <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 14 Apr 2016 08:09:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 23275 <at> debbugs.gnu.org and Alex Kost <alezost <at> gmail.com> Request was from Alex Kost <alezost <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 14 Apr 2016 08:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.