substitute: Send ‘User-Agent’ header.

* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers
to ‘build-request’.
master
Tobias Geerinckx-Rice 2017-03-30 19:21:20 +02:00
parent 32ea65370e
commit f264e838c0
No known key found for this signature in database
GPG Key ID: 91CCDB9B48541B99
1 changed files with 3 additions and 2 deletions

View File

@ -520,8 +520,9 @@ indicates that PATH is unavailable at CACHE-URL."
(define (narinfo-request cache-url path)
"Return an HTTP request for the narinfo of PATH at CACHE-URL."
(let ((url (string-append cache-url "/" (store-path-hash-part path)
".narinfo")))
(build-request (string->uri url) #:method 'GET)))
".narinfo"))
(headers '((User-Agent . "GNU Guile"))))
(build-request (string->uri url) #:method 'GET #:headers headers)))
(define* (http-multiple-get base-uri proc seed requests
#:key port (verify-certificate? #t))