download: Add "Accept: */*" to the headers.
Fixes downloads from https://alioth.debian.org. Reported by John Darrington <jmd@gnu.org>. * guix/build/download.scm (http-fetch)[headers]: Add 'Accept'.
This commit is contained in:
parent
d99e12d247
commit
38bf090e7c
1 changed files with 9 additions and 5 deletions
|
@ -212,10 +212,14 @@ which is not available during bootstrap."
|
||||||
(string>? (version) "2.0.7")))
|
(string>? (version) "2.0.7")))
|
||||||
|
|
||||||
(define headers
|
(define headers
|
||||||
;; Some web sites, such as http://dist.schmorp.de, would block you if
|
'(;; Some web sites, such as http://dist.schmorp.de, would block you if
|
||||||
;; there's no 'User-Agent' header, presumably on the assumption that
|
;; there's no 'User-Agent' header, presumably on the assumption that
|
||||||
;; you're a spammer. So work around that.
|
;; you're a spammer. So work around that.
|
||||||
'((User-Agent . "GNU Guile")))
|
(User-Agent . "GNU Guile")
|
||||||
|
|
||||||
|
;; Some servers, such as https://alioth.debian.org, return "406 Not
|
||||||
|
;; Acceptable" when not explicitly told that everything is accepted.
|
||||||
|
(Accept . "*/*")))
|
||||||
|
|
||||||
(let*-values (((connection)
|
(let*-values (((connection)
|
||||||
(open-connection-for-uri uri))
|
(open-connection-for-uri uri))
|
||||||
|
|
Reference in a new issue