1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
Commit graph

2088 commits

Author SHA1 Message Date
aszlig ccf55bead1
nginx: Clear Last-Modified if ETag is from store
This is what I've suspected a while ago[1]:

> Heads-up everyone: After testing this in a few production instances,
> it seems that some browsers still get cache hits for new store paths
> (and changed contents) for some reason. I highly suspect that it might
> be due to the last-modified header (as mentioned in [2]).
>
> Going to test this with last-modified disabled for a little while and
> if this is the case I think we should improve that patch by disabling
> last-modified if serving from a store path.

Much earlier[2] when I reviewed the patch, I wrote this:

> Other than that, it looks good to me.
>
> However, I'm not sure what we should do with Last-Modified header.
> From RFC 2616, section 13.3.4:
>
> - If both an entity tag and a Last-Modified value have been
>   provided by the origin server, SHOULD use both validators in
>   cache-conditional requests. This allows both HTTP/1.0 and
>   HTTP/1.1 caches to respond appropriately.
>
> I'm a bit nervous about the SHOULD here, as user agents in the wild
> could possibly just use Last-Modified and use the cached content
> instead.

Unfortunately, I didn't pursue this any further back then because
@pbogdan noted[3] the following:

> Hmm, could they (assuming they are conforming):
>
>  * If an entity tag has been provided by the origin server, MUST
>    use that entity tag in any cache-conditional request (using If-
>    Match or If-None-Match).

Since running with this patch in some deployments, I found that both
Firefox and Chrome/Chromium do NOT re-validate against the ETag if the
Last-Modified header is still the same.

So I wrote a small NixOS VM test with Geckodriver to have a test case
which is closer to the real world and I indeed was able to reproduce
this.

Whether this is actually a bug in Chrome or Firefox is an entirely
different issue and even IF it is the fault of the browsers and it is
fixed at some point, we'd still need to handle this for older browser
versions.

Apart from clearing the header, I also recreated the patch by using a
plain "git diff" with a small description on top. This should make it
easier for future authors to work on that patch.

[1]: https://github.com/NixOS/nixpkgs/pull/48337#issuecomment-495072764
[2]: https://github.com/NixOS/nixpkgs/pull/48337#issuecomment-451644084
[3]: https://github.com/NixOS/nixpkgs/pull/48337#issuecomment-451646135

Signed-off-by: aszlig <aszlig@nix.build>
2019-12-30 14:30:36 +01:00
lewo 885c4cc97c
Merge pull request #76151 from Ma27/bump-hydra
hydra: 2019-08-30 -> 2019-11-13
2019-12-29 10:28:44 +01:00
Maximilian Bosch c5c7ccf022
nixos/nginx: fix test
When using format-strings, curly brackets need to be escaped using `{{`
to avoid errors from python.

And apparently, Perl's `==` is used to compare substrings[1] which is why
the translation to `assert http_code == "304"` failed as the string
contains several headers from curl.

[1] Just check `perl <(echo 'die "alarm" if "foo\n304" == 304')`
2019-12-26 18:50:38 +01:00
Maximilian Bosch 495b0b581c
nixos/tests/nginx-sso: add subtests for each assertion 2019-12-26 17:59:25 +01:00
Robin Gloster abbce768dc
nixosTests.nginx*: review fixes
Co-Authored-By: Florian Klink <flokli@flokli.de>
2019-12-26 17:59:25 +01:00
Robin Gloster 1c2781d39c
nixosTests.nginx*: port to python 2019-12-26 17:59:25 +01:00
Aaron Andersen 4d2dd15546
Merge pull request #73113 from aanderse/httpd-vhost
nixos/httpd: support overridable virtual hosts
2019-12-26 08:09:08 -05:00
Maximilian Bosch ec253e16cd
Merge pull request #76410 from nh2/mumble-test-python
nixosTests.mumble: port to python
2019-12-26 02:33:43 +01:00
Jörg Thalheim 89c55c0a6d
net-snmp: split outputs (#76155)
net-snmp: split outputs
2019-12-25 06:27:55 +00:00
Aaron Andersen 79215f0df1 nixos/httpd: limit serving web content to virtual hosts, convert virtualHosts option type from listOf to attrsOf, add ACME integration 2019-12-24 20:27:48 -05:00
markuskowa 0b41391890
Merge pull request #76425 from r-ryantm/auto-update/slurm
slurm: 19.05.4.1 -> 19.05.5.1
2019-12-24 20:19:50 +01:00
Markus Kowalewski 5041e1d848
nixos/slurm: fix perl->python conversion bug 2019-12-24 19:51:18 +01:00
Niklas Hambüchen c6a032ecf6 nixosTests.mumble: port to python 2019-12-24 16:10:34 +01:00
Florian Klink eeaf1f702d
Merge pull request #75103 from sternenseemann/spacecookie
services/spacecookie: init
2019-12-23 11:09:52 +01:00
Aaron Andersen 086d1ad906
Merge pull request #75047 from kampka/trilium-server
Add trilium server and module
2019-12-22 20:26:57 -05:00
Christian Kampka ebf3f1fe78
trilium: Pin platforms to x86_64 linux 2019-12-22 15:04:09 +01:00
Maximilian Bosch 7675c0b2a9
nixos/tests/hydra: port to python 2019-12-22 14:36:11 +01:00
Jörg Thalheim aadfcc0900
nixos/keepalived: add test 2019-12-22 08:52:56 +00:00
Maximilian Bosch 875ec0a707
nixos/hydra: also run test with pkgs.nixFlakes 2019-12-21 22:02:36 +01:00
Maximilian Bosch f2915c1616
Merge pull request #75464 from mmilata/rspamd-python-test
nixosTests.rspamd: port to python
2019-12-21 01:25:18 +01:00
Dmitry Kalinkin aa934faff2
Merge pull request #75703 from kampka/port-tests-3
Port NixOS tests to python
2019-12-20 09:52:33 -05:00
Florian Klink dee7a7f301
Merge pull request #75721 from kampka/port-tests-networking
nixosTests.networking: Port tests to python
2019-12-19 21:10:37 +01:00
Michael Raskin 6210c15573
Merge pull request #67507 from misuzu/package-3proxy
3proxy: init at 0.8.13
2019-12-19 15:42:15 +00:00
Christian Kampka 9f97485399
trilium-server: Add nginx reverse proxy configuration to module 2019-12-19 10:14:13 +01:00
Christian Kampka 82f038d468
trilium-server: Add module 2019-12-19 10:14:12 +01:00
Frederik Rietdijk f79e10061f Merge master into staging-next 2019-12-19 09:19:50 +01:00
Jan Tojnar 6be14ee97b
Merge pull request #53843 from hedning/session-default
nixos/displayManager: introduce defaultSession
2019-12-18 21:16:06 +01:00
Dmitry Kalinkin 9faa37cfdf
Merge pull request #75701 from kampka/port-tests-2
Port NixOS tests to python
2019-12-17 21:51:42 -05:00
Dmitry Kalinkin fc47ec691f
Merge pull request #75695 from kampka/port-tests
Port NixOS tests to python
2019-12-17 21:45:59 -05:00
sternenseemann 25503db8e8 nixos/spacecookie: add service module and test 2019-12-17 14:17:03 +01:00
Christian Kampka 98d562f0b3
nixosTests.networking: Port tests to python 2019-12-17 11:22:28 +01:00
Christian Kampka 05587aba8b
nixosTests.hitch: Port tests to python 2019-12-17 09:37:07 +01:00
Christian Kampka 5cb7b2cf60
nixosTests.hadoop.yarn: Port tests to python 2019-12-17 09:37:06 +01:00
Christian Kampka 563eea492b
nixosTests.hadoop.hdfs: Port tests to python 2019-12-17 09:37:02 +01:00
Christian Kampka a6ac3fd89f
nixosTests.initrd-network: Port tests to python 2019-12-16 12:52:34 +01:00
Christian Kampka 9fbb427f67
nixosTests.haproxy: Port tests to python 2019-12-16 12:52:33 +01:00
Christian Kampka 0de0b6a281
nixosTests.leaps: Port tests to python 2019-12-16 12:52:32 +01:00
Christian Kampka 40ed6896e3
nixosTests.lidarr: Port tests to python 2019-12-16 12:52:31 +01:00
Christian Kampka 1f2030fdcb
nixosTests.mailcatcher: Port tests to python 2019-12-16 12:52:30 +01:00
Christian Kampka 23d164edb4
nixosTests.wireguard.namespaces: Port test to python 2019-12-16 12:52:29 +01:00
Christian Kampka 229a0afb28
nixosTests.paperless: Port tests to python 2019-12-15 20:10:57 +01:00
Christian Kampka d76ab647e6
nixosTests.pdns-recursor: Port tests not python 2019-12-15 20:08:02 +01:00
Christian Kampka d58814ac5a
nixosTests.peerflix: Port tests to python 2019-12-15 20:08:01 +01:00
Christian Kampka a20683acbe
nixosTests.pgmanage: Port tests to python 2019-12-15 20:08:00 +01:00
Christian Kampka 1bf1ec35bc
nixosTests.php-pcre: Port tests to python 2019-12-15 20:07:59 +01:00
Christian Kampka d029e28b78
nixosTests.postgis: Port tests to python 2019-12-15 20:07:58 +01:00
Christian Kampka e96802ccb2
nixosTests.quagga: Port tests to python 2019-12-15 20:07:52 +01:00
Christian Kampka c811e76d82
nixosTests.mutable-users: Port tests to python 2019-12-15 19:53:17 +01:00
Christian Kampka 58cd46ba21
nixosTests.mxisd: Port tests to python 2019-12-15 19:46:53 +01:00
Christian Kampka 8c683b3b13
nixosTests.nesting: Port tests to python 2019-12-15 19:42:21 +01:00