download: Follow HTTP 307 "Temporary Redirection".

Fixes <http://bugs.gnu.org/23275>.
Reported by Albin Söderqvist <albin@fripost.org>.

* guix/build/download.scm (http-fetch): Follow redirections upon 307.
  This is what 'binaries.openttd.org' does.
This commit is contained in:
Alex Kost 2016-04-12 11:14:59 +03:00
parent 5c93de7337
commit 82fd23b81f
1 changed files with 2 additions and 1 deletions

View File

@ -530,7 +530,8 @@ Return the resulting target URI."
(put-bytevector p bv-or-port)))) (put-bytevector p bv-or-port))))
file)) file))
((301 ; moved permanently ((301 ; moved permanently
302) ; found (redirection) 302 ; found (redirection)
307) ; temporary redirection
(let ((uri (resolve-uri-reference (response-location resp) uri))) (let ((uri (resolve-uri-reference (response-location resp) uri)))
(format #t "following redirection to `~a'...~%" (format #t "following redirection to `~a'...~%"
(uri->string uri)) (uri->string uri))