substitute: Send ‘User-Agent’ header.
* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers to ‘build-request’.
This commit is contained in:
parent
32ea65370e
commit
f264e838c0
|
@ -520,8 +520,9 @@ indicates that PATH is unavailable at CACHE-URL."
|
||||||
(define (narinfo-request cache-url path)
|
(define (narinfo-request cache-url path)
|
||||||
"Return an HTTP request for the narinfo of PATH at CACHE-URL."
|
"Return an HTTP request for the narinfo of PATH at CACHE-URL."
|
||||||
(let ((url (string-append cache-url "/" (store-path-hash-part path)
|
(let ((url (string-append cache-url "/" (store-path-hash-part path)
|
||||||
".narinfo")))
|
".narinfo"))
|
||||||
(build-request (string->uri url) #:method 'GET)))
|
(headers '((User-Agent . "GNU Guile"))))
|
||||||
|
(build-request (string->uri url) #:method 'GET #:headers headers)))
|
||||||
|
|
||||||
(define* (http-multiple-get base-uri proc seed requests
|
(define* (http-multiple-get base-uri proc seed requests
|
||||||
#:key port (verify-certificate? #t))
|
#:key port (verify-certificate? #t))
|
||||||
|
|
Loading…
Reference in New Issue