download: Follow HTTP redirection upon 301 "moved permanently".

* guix/build/download.scm (http-fetch): Follow redirections upon 301.
  This is what `downloads.sourceforge.net' returns, for instance.
master
Ludovic Courtès 2013-01-25 21:36:26 +01:00
parent 695e671723
commit 67158a4900
1 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,8 @@ which is not available during bootstrap."
(newline))
(put-bytevector p bv-or-port))))
file))
((302) ; found (redirection)
((301 ; moved permanently
302) ; found (redirection)
(let ((uri (response-location resp)))
(format #t "following redirection to `~a'...~%"
(uri->string uri))