[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: substitute: Send ‘User-Agent’ header.

From: Tobias Geerinckx-Rice
Subject: 03/04: substitute: Send ‘User-Agent’ header.
Date: Fri, 31 Mar 2017 09:32:27 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit f264e838c0f8b63e93cd7b8a9d5d8e2208d82467
Author: Tobias Geerinckx-Rice <address@hidden>
Date:   Thu Mar 30 19:21:20 2017 +0200

    substitute: Send ‘User-Agent’ header.
    * guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers
    to ‘build-request’.
 guix/scripts/substitute.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index faeb019..d3bccf4 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))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]