]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: Enable again reg tests with HEAD HTTP method usage.
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 26 Mar 2019 10:06:29 +0000 (11:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 Mar 2019 10:54:05 +0000 (11:54 +0100)
These reg tests have been disabled because they required a version of vtest
including a bug fix supposed to make these ones work without breaking others.
But reg-tests for compression were broken.

This issue has been fixed by 525ef0f vtest commit. So, to make all the
reg tests work you must update your vtest program to include 525ef0f commit.
(see https://github.com/vtest/VTest/commit/525ef0f for more information.

reg-tests/http-messaging/h00000.vtc

index 951a926fc4699f90f5106f6bfa9b0d1d38bb09eb..b09a2bd359dfa7b17403e74033ca4434b84f625d 100644 (file)
@@ -25,7 +25,7 @@ server s1 {
        txresp \
          -status 200 \
          -body "response 4"
-} -repeat 2 -start
+} -repeat 3 -start
 
 haproxy h1 -conf {
     defaults
@@ -87,47 +87,47 @@ client c1h1 -connect ${h1_feh1_sock} {
 # HEAD requests
 # Note: for now they fail with varnishtest, which expects the amount of
 # data advertised in the content-length response.
-#client c2h1 -connect ${h1_feh1_sock} {
-#      # first request is valid
-#      txreq \
-#        -req "HEAD" \
-#        -url "/test11.html"
-#      rxresp
-#      expect resp.status == 200
-#
-#      # second request is valid and advertises C-L:0
-#      txreq \
-#        -req "HEAD" \
-#        -url "/test12.html" \
-#          -hdr "content-length: 0"
-#      rxresp
-#      expect resp.status == 200
-#
-#      # third request sends a body with a GET
-#      txreq \
-#        -req "GET" \
-#        -url "/test13.html" \
-#          -body "this must be delivered, like it or not"
-#      rxresp
-#      expect resp.status == 200
-#
-#      # fourth request is valid and advertises C-L:0, and close, and is
-#      # followed by a string "this is not sent\r\n\r\n" which must be
-#      # dropped.
-#      txreq \
-#        -req "HEAD" \
-#        -url "/test14.html" \
-#          -hdr "content-length: 0" \
-#          -hdr "connection: close"
-#      # "this is not sent"
-#      sendhex "74787973207973206E6F742073656E740D0A0D0A"
-#      rxresp
-#      expect resp.status == 200
-#
-#      # the connection is expected to be closed and no more response must
-#      # arrive here.
-#      expect_close
-#} -run
+client c2h1 -connect ${h1_feh1_sock} {
+       # first request is valid
+       txreq \
+         -req "HEAD" \
+         -url "/test11.html"
+       rxresp
+       expect resp.status == 200
+
+       # second request is valid and advertises C-L:0
+       txreq \
+         -req "HEAD" \
+         -url "/test12.html" \
+          -hdr "content-length: 0"
+       rxresp
+       expect resp.status == 200
+
+       # third request sends a body with a GET
+       txreq \
+         -req "GET" \
+         -url "/test13.html" \
+          -body "this must be delivered, like it or not"
+       rxresp
+       expect resp.status == 200
+
+       # fourth request is valid and advertises C-L:0, and close, and is
+       # followed by a string "this is not sent\r\n\r\n" which must be
+       # dropped.
+       txreq \
+         -req "HEAD" \
+         -url "/test14.html" \
+          -hdr "content-length: 0" \
+          -hdr "connection: close"
+       # "this is not sent"
+       sendhex "74787973207973206E6F742073656E740D0A0D0A"
+       rxresp
+       expect resp.status == 200
+
+       # the connection is expected to be closed and no more response must
+       # arrive here.
+       expect_close
+} -run
 
 client c1h1 -connect ${h1_feh1_sock} {
        # first request is valid