From: Christopher Faulet Date: Wed, 16 Nov 2022 16:19:42 +0000 (+0100) Subject: REG-TESTS: cache: Remove T-E header for 304-Not-Modified responses X-Git-Tag: v2.7-dev9~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0e1a87948cc1858e82c656d18344051838a4af0;p=thirdparty%2Fhaproxy.git REG-TESTS: cache: Remove T-E header for 304-Not-Modified responses VTEST does not properly handle 304-Not-Modified responses. If a Transfer-Encoding header (and probably a Content-Lenght header too), it waits for a body. Waiting for a fix, the Transfer-Encoding encoding of cached responses in 2 VTEST scripts are removed. Note it is now an issue because of a fix in the H1 multiplexer : * 226082d13a "BUG/MINOR: mux-h1: Do not send a last null chunk on body-less answers" This patch must be backported with the above commit. --- diff --git a/reg-tests/cache/if-modified-since.vtc b/reg-tests/cache/if-modified-since.vtc index 4d6ea6f6a1..a49e4732a4 100644 --- a/reg-tests/cache/if-modified-since.vtc +++ b/reg-tests/cache/if-modified-since.vtc @@ -61,6 +61,10 @@ haproxy h1 -conf { server www ${s1_addr}:${s1_port} http-response cache-store my_cache + # Remove Transfer-Encoding header because of a vtest issue with + # 304-Not-Modified responses + http-after-response del-header transfer-encoding if { status eq 304 } + cache my_cache total-max-size 3 max-age 20 @@ -148,4 +152,3 @@ client c1 -connect ${h1_fe_sock} { expect resp.bodylen == 0 } -run - diff --git a/reg-tests/cache/if-none-match.vtc b/reg-tests/cache/if-none-match.vtc index b5ad033bb9..ff90ad4223 100644 --- a/reg-tests/cache/if-none-match.vtc +++ b/reg-tests/cache/if-none-match.vtc @@ -46,6 +46,10 @@ haproxy h1 -conf { server www ${s1_addr}:${s1_port} http-response cache-store my_cache + # Remove Transfer-Encoding header because of a vtest issue with + # 304-Not-Modified responses + http-after-response del-header transfer-encoding if { status eq 304 } + cache my_cache total-max-size 3 max-age 20