about summary refs log tree commit diff
path: root/scripts/download-from-binary-cache.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T22·05-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-11T22·05-0400
commitd287b62b6432ce3155e963c6471edf79ec70439a (patch)
treeaa27f5e62cb4efe56d1776b138a40cdb7fb46d55 /scripts/download-from-binary-cache.pl.in
parentb74d92755d1ca6a1538f292dcb5a906f66af7b51 (diff)
Set the User-Agent header to "Nix/<version>"
Diffstat (limited to 'scripts/download-from-binary-cache.pl.in')
-rw-r--r--scripts/download-from-binary-cache.pl.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in
index 93155e0b562f..ca3ff807be84 100644
--- a/scripts/download-from-binary-cache.pl.in
+++ b/scripts/download-from-binary-cache.pl.in
@@ -41,6 +41,7 @@ sub addRequest {
     $curl->setopt(CURLOPT_WRITEDATA, \$requests{$curlId}->{content});
     $curl->setopt(CURLOPT_FOLLOWLOCATION, 1);
     $curl->setopt(CURLOPT_CAINFO, $caBundle) if defined $caBundle;
+    $curl->setopt(CURLOPT_USERAGENT, "Nix/$Nix::Config::version");
     $curl->setopt(CURLOPT_NOBODY, 1) if $head;
 
     if ($activeRequests >= $maxParallelRequests) {