summaryrefslogtreecommitdiff
path: root/guix/scripts/substitute.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2017-03-30 19:21:20 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2017-03-31 15:33:16 +0200
commitf264e838c0f8b63e93cd7b8a9d5d8e2208d82467 (patch)
treeb631df691be70f12226506e355a3458e1cbb7522 /guix/scripts/substitute.scm
parent32ea65370ee329f9a5eacadf60f2c7cd77f414e2 (diff)
downloadguix-patches-f264e838c0f8b63e93cd7b8a9d5d8e2208d82467.tar
guix-patches-f264e838c0f8b63e93cd7b8a9d5d8e2208d82467.tar.gz
substitute: Send ‘User-Agent’ header.
* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers to ‘build-request’.
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-xguix/scripts/substitute.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index faeb019120..d3bccf4ddb 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -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))