From d013f8957c0d464e0059cc107ca79d887cf9f8aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 16 Sep 2021 19:48:33 +0200 Subject: Disable HTTP Range usage if varnish < 6.4 is involved Debian buster (oldstable) ships 6.1 while bullseye (stable) ships 6.5 and so the later is 'fixed'. Upstream declares 6.0 still as supported. It might be still a while we encounter "bad" versions in the wild, so if we can detect and work around the issue at runtime automatically we can save some users from running into "persistent" partial files. References: https://varnish-cache.org/docs/6.4/whats-new/changes-6.4.html#changes-in-behavior --- test/integration/test-http-if-range | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/integration/test-http-if-range b/test/integration/test-http-if-range index 7eb667ba7..ca9f3b2e6 100755 --- a/test/integration/test-http-if-range +++ b/test/integration/test-http-if-range @@ -75,3 +75,8 @@ testrun 'buggy server' '200' '206' '206' '416' echo 'Acquire::http::localhost::AllowRanges "false";' > rootdir/etc/apt/apt.conf.d/noallowranges testrun 'range disabled by conf' '200' '200' '200' '200' rm rootdir/etc/apt/apt.conf.d/noallowranges +# detect varnish < 6.4 automatically +webserverconfig 'aptwebserver::response-header::Via' '1.1 varnish (Varnish/6.1)' +testrun 'bad varnish' '200' '200' '200' '200' +webserverconfig 'aptwebserver::response-header::Via' '1.1 varnish (Varnish/6.4)' +testrun 'good varnish' '200' '206' '206' '416' -- cgit v1.2.3-70-g09d2