]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: filters: Don't set C-L header in the successful response to CONNECT
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Oct 2023 06:11:19 +0000 (08:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 4 Oct 2023 13:34:18 +0000 (15:34 +0200)
in random-forwarding.vtc script, adding "Content-Lnegth; 0" header in the
successful response to the CONNECT request is invalid but it may also lead
to wrong check on the response. "rxresp" directive don"t handle CONNECT
response. Thus "-no_obj" must be added instead, to be sure the payload won't
be retrieved or expected.

reg-tests/filters/random-forwarding.vtc

index 87e29a6c2aa44c5ccc8c9d123e6b439dc0612013..abb2bccfa41475c10bdb92f05e735a168d066e99 100644 (file)
@@ -19,8 +19,7 @@ server s1 {
 
         rxreq
         expect req.url == "127.0.0.1:80"
-        txresp \
-          -hdr "Content-Length: 0"
+        txresp -nolen
         recv 36000
         send_n 1000 "0123456789abcdefghijklmnopqrstuvwxyz"
         barrier b1 sync
@@ -93,7 +92,7 @@ client c1 -connect ${h1_fe1_sock} {
         expect resp.bodylen == 1048576
 
         txreq -method "CONNECT" -url "127.0.0.1:80" -nolen
-        rxresp
+        rxresp -no_obj
         expect resp.status == 200
         send_n 1000 "0123456789abcdefghijklmnopqrstuvwxyz"
         recv 36000