diff options
author | Aniket Deshpande <anicake@gmail.com> | 2019-06-28 19:43:22 +0530 |
---|---|---|
committer | Aniket Deshpande <anicake@gmail.com> | 2019-06-28 20:44:46 +0530 |
commit | ec58ba38c55a3ab61fdb1da7d746251e4887ea2c (patch) | |
tree | 73b029b529c6aea6d0e971a2cd6455d3802b1e0e /src/libexpr/value-to-xml.hh | |
parent | 6847c9278840edc97f1ef85b5fafac4338fb1b37 (diff) |
Fix `http2 = false` having no effect. Fixes #2971.
Setting `http2 = false` in nix config (e.g. /etc/nix/nix.conf)
had no effect, and `nix-env -vvvvv -i hello` still downloaded .nar
packages using HTTP/2.
In `src/libstore/download.cc`, the `CURL_HTTP_VERSION_2TLS` option was
being explicitly set when `downloadSettings.enableHttp2` was `true`,
but, `CURL_HTTP_VERSION_1_1` option was not being explicitly set when
`downloadSettings.enableHttp2` was `false`.
This may be because `https://curl.haxx.se/libcurl/c/libcurl-env.html` states:
"You have to set this option if you want to use libcurl's HTTP/2 support."
but, also, in the changelog, states:
"DEFAULT
Since curl 7.62.0: CURL_HTTP_VERSION_2TLS
Before that: CURL_HTTP_VERSION_1_1"
So, the default setting for `libcurl` is HTTP/2 for version >= 7.62.0.
In this commit, option `CURLOPT_HTTP_VERSION` is explicitly set to
`CURL_HTTP_VERSION_1_1` when `downloadSettings.enableHttp2` nix config
setting is `false`.
This can be tested by running `nix-env -vvvvv -i hello | grep HTTP`
Diffstat (limited to 'src/libexpr/value-to-xml.hh')
0 files changed, 0 insertions, 0 deletions