mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Include DeterminateNix in the User-Agent header
The User-Agent now shows `curl/8.11.0 Nix/2.26.3 DeterminateNix/3.0.0`. This is useful for distinguishing Determinate Nix from upstream Nix in binary cache logs.
This commit is contained in:
parent
1b00094110
commit
288c5b0abd
1 changed files with 3 additions and 1 deletions
|
@ -324,7 +324,9 @@ struct curlFileTransfer : public FileTransfer
|
|||
curl_easy_setopt(req, CURLOPT_MAXREDIRS, 10);
|
||||
curl_easy_setopt(req, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_setopt(req, CURLOPT_USERAGENT,
|
||||
("curl/" LIBCURL_VERSION " Nix/" + nixVersion +
|
||||
("curl/" LIBCURL_VERSION
|
||||
" Nix/" + nixVersion +
|
||||
" DeterminateNix/" + determinateNixVersion +
|
||||
(fileTransferSettings.userAgentSuffix != "" ? " " + fileTransferSettings.userAgentSuffix.get() : "")).c_str());
|
||||
#if LIBCURL_VERSION_NUM >= 0x072b00
|
||||
curl_easy_setopt(req, CURLOPT_PIPEWAIT, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue