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/nixpkgs
base: f27690a25243
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 9bc23f31d291
Choose a head ref
  • 7 commits
  • 3 files changed
  • 3 contributors

Commits on Apr 18, 2019

  1. nginx: if root is in Nix store, use path's hash as ETag

    Resolves #25485. Usage example:
    
    $ realpath /var/www
    /nix/store/wnrhnnpdj3x50j5xz38zp1qxs1ygwccw-site
    $ curl --head localhost
    HTTP/1.1 200 OK
    Server: nginx
    Date: Fri, 28 Sep 2018 06:09:25 GMT
    Content-Type: text/html
    Content-Length: 50
    Last-Modified: Thu, 01 Jan 1970 00:00:01 GMT
    Connection: keep-alive
    ETag: "wnrhnnpdj3x50j5xz38zp1qxs1ygwccw"
    Accept-Ranges: bytes
    lukateras authored and aszlig committed Apr 18, 2019
    Copy the full SHA
    135d54f View commit details
    Browse the repository at this point in the history
  2. nginx: check for realpath() == NULL in ETag patch

    Thanks to Gabriel Ebner!
    lukateras authored and aszlig committed Apr 18, 2019
    Copy the full SHA
    f03302b View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    1da8eec View commit details
    Browse the repository at this point in the history
  4. nginx: Fix memleak in nix-etag patch

    The original patch introduced a new "real" variable which gets populated
    (and allocated) via ngx_realpath(). It's properly freed in error
    conditions but it won't be freed if ngx_http_set_etag returns
    successfully.
    
    Adding another ngx_free() just before returning fixes that memory leak.
    
    I also fixed a small indentation issue along the way.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Apr 18, 2019
    Copy the full SHA
    af5a3ce View commit details
    Browse the repository at this point in the history
  5. nixos/tests/nginx: Add subtest for Nix ETag patch

    This is to make sure that we get different ETag values whenever we
    switch to a different store path but with the same file contents.
    
    I've checked this against the old behaviour without the patch and it
    fails as expected.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Apr 18, 2019
    Copy the full SHA
    d533285 View commit details
    Browse the repository at this point in the history
  6. nginx/etag-patch: Use Nix store dir from build env

    So far, the Nix store directory was hardcoded and if someone uses a
    different Nix store directory the patch won't work. Of course, this is
    pretty uncommon, but by not only substituting the store directory but
    also the length of it we also save a few calls to ngx_strlen(), which
    should save us a few cycles.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Apr 18, 2019
    Copy the full SHA
    1f24685 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #48337 from transumption/201810/nginx-etag

    nginx: if root is in Nix store, use path's hash as ETag
    domenkozar committed Apr 18, 2019
    Copy the full SHA
    9bc23f3 View commit details
    Browse the repository at this point in the history