Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 6847c9278840
Choose a base ref
...
head repository: NixOS/nix
compare: 5c8f4772836c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 28, 2019

  1. 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`
    Aniket Deshpande committed Jun 28, 2019
    Copy the full SHA
    ec58ba3 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2977 from aniketd/2971-cannot-disable-http2

    Fix `http2 = false` having no effect.
    edolstra committed Jun 28, 2019
    Copy the full SHA
    5c8f477 View commit details
    Browse the repository at this point in the history