diff --git a/reg-tests/cache/h00000.vtc b/reg-tests/cache/h00000.vtc index 100c860e43..e8255af513 100644 --- a/reg-tests/cache/h00000.vtc +++ b/reg-tests/cache/h00000.vtc @@ -26,6 +26,7 @@ server s1 { haproxy h1 -conf { defaults mode http + ${no-htx} option http-use-htx timeout connect 1s timeout client 1s timeout server 1s diff --git a/reg-tests/connection/b00000.vtc b/reg-tests/connection/b00000.vtc index 50bb749448..674cadd0b9 100644 --- a/reg-tests/connection/b00000.vtc +++ b/reg-tests/connection/b00000.vtc @@ -16,7 +16,7 @@ syslog Slog_1 -repeat 8 -level info { recv expect ~ "Connect from .* to ${h1_ssl_addr}:${h1_ssl_port}" recv - expect ~ "ssl-offload-http/http .* \"POST /[1-8] HTTP/1\\.1\"" + expect ~ "ssl-offload-http/http .* \"POST /[1-8] HTTP/(2\\.0|1\\.1)\"" } -start haproxy h1 -conf { @@ -29,6 +29,7 @@ haproxy h1 -conf { defaults mode http + ${no-htx} option http-use-htx timeout client 1s timeout server 1s timeout connect 1s diff --git a/reg-tests/connection/h00001.vtc b/reg-tests/connection/h00001.vtc index fccd6ec4b9..bac19d8fdf 100644 --- a/reg-tests/connection/h00001.vtc +++ b/reg-tests/connection/h00001.vtc @@ -26,6 +26,7 @@ listen fe_tcp listen fe_http bind "fd@${fe_http}" mode http + ${no-htx} option http-use-htx dispatch ${s2_addr}:${s2_port} } -start diff --git a/reg-tests/http-cookies/h00000.vtc b/reg-tests/http-cookies/h00000.vtc index 3ea16acc0e..f599a0f125 100644 --- a/reg-tests/http-cookies/h00000.vtc +++ b/reg-tests/http-cookies/h00000.vtc @@ -31,6 +31,7 @@ haproxy h1 -conf { defaults mode http + ${no-htx} option http-use-htx option httplog timeout client 1s timeout server 1s diff --git a/reg-tests/http-messaging/h00000.vtc b/reg-tests/http-messaging/h00000.vtc index 3954f3623a..951a926fc4 100644 --- a/reg-tests/http-messaging/h00000.vtc +++ b/reg-tests/http-messaging/h00000.vtc @@ -1,4 +1,4 @@ -varnishtest "HTTP request tests: H1 to H1, legacy mode" +varnishtest "HTTP request tests: H1 to H1 (HTX mode supported only for HAProxy >= 1.9)" #REQUIRE_VERSION=1.6 # Run it with HAPROXY_PROGRAM=$PWD/haproxy varnishtest -l -k -t 1 "$1" @@ -30,7 +30,7 @@ server s1 { haproxy h1 -conf { defaults mode http - #option http-use-htx + ${no-htx} option http-use-htx timeout connect 1s timeout client 1s timeout server 1s diff --git a/reg-tests/http-messaging/h00001.vtc b/reg-tests/http-messaging/h00001.vtc deleted file mode 100644 index 65b2ce09ac..0000000000 --- a/reg-tests/http-messaging/h00001.vtc +++ /dev/null @@ -1,172 +0,0 @@ -varnishtest "HTTP request tests: H1 to H1, HTX mode" -#REQUIRE_VERSION=1.9 - -# Run it with HAPROXY_PROGRAM=$PWD/haproxy varnishtest -l -k -t 1 "$1" - -feature ignore_unknown_macro - -server s1 { - rxreq - txresp \ - -status 200 \ - -body "response 1" - - rxreq - txresp \ - -status 200 \ - -body "response 2" - - rxreq - txresp \ - -status 200 \ - -body "response 3" - - rxreq - txresp \ - -status 200 \ - -body "response 4" -} -repeat 2 -start - -haproxy h1 -conf { - defaults - mode http - option http-use-htx - timeout connect 1s - timeout client 1s - timeout server 1s - - listen feh1 - bind "fd@${feh1}" - #bind "fd@${feh2}" proto h2 - server s1 ${s1_addr}:${s1_port} -} -start - -# GET requests -client c1h1 -connect ${h1_feh1_sock} { - # first request is valid - txreq \ - -req "GET" \ - -url "/test1.html" - rxresp - expect resp.status == 200 - - # second request is valid and advertises C-L:0 - txreq \ - -req "GET" \ - -url "/test2.html" \ - -hdr "content-length: 0" - rxresp - expect resp.status == 200 - - # third request sends a body with a GET - txreq \ - -req "GET" \ - -url "/test3.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 "GET" \ - -url "/test4.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 - -# 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 c1h1 -connect ${h1_feh1_sock} { - # first request is valid - txreq \ - -req "POST" \ - -url "/test21.html" - rxresp - expect resp.status == 200 - - # second request is valid and advertises C-L:0 - txreq \ - -req "POST" \ - -url "/test22.html" \ - -hdr "content-length: 0" - rxresp - expect resp.status == 200 - - # third request is valid and advertises (and sends) somme contents - txreq \ - -req "POST" \ - -url "/test23.html" \ - -body "this is sent" - 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 "POST" \ - -url "/test24.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 diff --git a/reg-tests/http-messaging/h00002.vtc b/reg-tests/http-messaging/h00002.vtc index 6fc536aed5..27d25402e8 100644 --- a/reg-tests/http-messaging/h00002.vtc +++ b/reg-tests/http-messaging/h00002.vtc @@ -1,4 +1,4 @@ -varnishtest "HTTP request tests: H2 to H1, legacy mode" +varnishtest "HTTP request tests: H2 to H1 (HTX and legacy mode)" #REQUIRE_VERSION=1.9 # Run it with HAPROXY_PROGRAM=$PWD/haproxy varnishtest -l -k -t 1 "$1" @@ -41,7 +41,7 @@ haproxy h1 -conf { #log stdout format raw daemon mode http option http-buffer-request - #option http-use-htx + ${no-htx} option http-use-htx timeout connect 1s timeout client 1s timeout server 1s diff --git a/reg-tests/http-messaging/h00003.vtc b/reg-tests/http-messaging/h00003.vtc deleted file mode 100644 index ec117563b8..0000000000 --- a/reg-tests/http-messaging/h00003.vtc +++ /dev/null @@ -1,274 +0,0 @@ -varnishtest "HTTP request tests: H2 to H1, HTX mode" -#REQUIRE_VERSION=1.9 - -# Run it with HAPROXY_PROGRAM=$PWD/haproxy varnishtest -l -k -t 1 "$1" - -feature ignore_unknown_macro - -# synchronize requests between streams -barrier b1 cond 2 -cyclic -barrier b2 cond 2 -cyclic -barrier b3 cond 2 -cyclic -barrier b4 cond 2 -cyclic - -server s1 { - rxreq - txresp \ - -status 200 \ - -body "response 1" - - barrier b2 sync - rxreq - txresp \ - -status 200 \ - -body "response 2" - - barrier b3 sync - rxreq - txresp \ - -status 200 \ - -body "response 3" - - barrier b4 sync - rxreq - txresp \ - -status 200 \ - -body "response 4" -} -repeat 2 -start - -haproxy h1 -conf { - defaults - #log stdout format raw daemon - mode http - option http-buffer-request - option http-use-htx - timeout connect 1s - timeout client 1s - timeout server 1s - - listen feh1 - bind "fd@${feh1}" - bind "fd@${feh2}" proto h2 - server s1 ${s1_addr}:${s1_port} -} -start - -client c1h2 -connect ${h1_feh2_sock} { - txpri - stream 0 { - txsettings - rxsettings - txsettings -ack - rxwinup - rxsettings - expect settings.ack == true - } -run - - # first request is valid - stream 1 { - txreq \ - -req "GET" \ - -scheme "https" \ - -url "/test1.html" - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 1" - } -run - - # second request is valid and advertises C-L:0 - stream 3 { - barrier b2 sync - txreq \ - -req "GET" \ - -scheme "https" \ - -url "/test2.html" \ - -hdr "content-length" "0" - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 2" - } -run - - # third request sends a body with a GET - stream 5 { - barrier b3 sync - txreq \ - -req "GET" \ - -scheme "https" \ - -url "/test3.html" \ - -nostrend \ - -body "this must be delivered, like it or not" - rxwinup - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 3" - } -run - - # 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. - stream 7 { - barrier b4 sync - txreq \ - -req "GET" \ - -scheme "https" \ - -url "/test4.html" \ - -hdr "content-length" "0" \ - -nostrend - txdata -data "this is sent and ignored" - rxwinup - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 4" - } -run -} -run - -# HEAD requests : don't work well yet -#client c2h2 -connect ${h1_feh2_sock} { -# txpri -# stream 0 { -# txsettings -# rxsettings -# txsettings -ack -# rxwinup -# rxsettings -# expect settings.ack == true -# } -run -# -# # first request is valid -# stream 1 { -# txreq \ -# -req "HEAD" \ -# -scheme "https" \ -# -url "/test11.html" -# rxhdrs -# expect resp.status == 200 -# rxdata -all -# expect resp.bodylen == 0 -# } -run -# -# # second request is valid and advertises C-L:0 -# stream 3 { -# barrier b2 sync -# txreq \ -# -req "HEAD" \ -# -scheme "https" \ -# -url "/test12.html" \ -# -hdr "content-length" "0" -# rxhdrs -# expect resp.status == 200 -# rxdata -all -# expect resp.bodylen == 0 -# } -run -# -# # third request sends a body with a GET -# stream 5 { -# barrier b3 sync -# txreq \ -# -req "HEAD" \ -# -scheme "https" \ -# -url "/test13.html" \ -# -nostrend \ -# -body "this must be delivered, like it or not" -# rxwinup -# rxhdrs -# expect resp.status == 200 -# rxdata -all -# expect resp.bodylen == 0 -# } -run -# -# # 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. -# stream 7 { -# barrier b4 sync -# txreq \ -# -req "HEAD" \ -# -scheme "https" \ -# -url "/test14.html" \ -# -hdr "content-length" "0" \ -# -nostrend -# txdata -data "this is sent and ignored" -# rxwinup -# rxhdrs -# expect resp.status == 200 -# rxdata -all -# expect resp.bodylen == 0 -# } -run -#} -run - -# POST requests -client c3h2 -connect ${h1_feh2_sock} { - txpri - stream 0 { - txsettings - rxsettings - txsettings -ack - rxwinup - rxsettings - expect settings.ack == true - } -run - - # first request is valid - stream 1 { - txreq \ - -req "POST" \ - -scheme "https" \ - -url "/test21.html" - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 1" - } -run - - # second request is valid and advertises C-L:0 - stream 3 { - barrier b2 sync - txreq \ - -req "POST" \ - -scheme "https" \ - -url "/test22.html" \ - -hdr "content-length" "0" - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 2" - } -run - - # third request sends a body with a GET - stream 5 { - barrier b3 sync - txreq \ - -req "POST" \ - -scheme "https" \ - -url "/test23.html" \ - -nostrend \ - -body "this must be delivered, like it or not" - rxwinup - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 3" - } -run - - # 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. - stream 7 { - barrier b4 sync - txreq \ - -req "POST" \ - -scheme "https" \ - -url "/test24.html" \ - -hdr "content-length" "0" \ - -nostrend - txdata -data "this is sent and ignored" - rxwinup - rxhdrs - expect resp.status == 200 - rxdata -all - expect resp.body == "response 4" - } -run -} -run diff --git a/reg-tests/http-rules/h00001.vtc b/reg-tests/http-rules/h00001.vtc index 2056ea732a..ebe8b576ec 100644 --- a/reg-tests/http-rules/h00001.vtc +++ b/reg-tests/http-rules/h00001.vtc @@ -38,6 +38,7 @@ server s1 { haproxy h1 -conf { defaults mode http + ${no-htx} option http-use-htx timeout connect 1s timeout client 1s timeout server 1s diff --git a/reg-tests/http-rules/h00002.vtc b/reg-tests/http-rules/h00002.vtc deleted file mode 100644 index 1f3c29d977..0000000000 --- a/reg-tests/http-rules/h00002.vtc +++ /dev/null @@ -1,226 +0,0 @@ -varnishtest "Composite HTX manipulation test (H1 and H2 clear to H1 clear)" -#REQUIRE_VERSION=1.9 - -# This config tests several http-request features and their interactions. -# It extracts some samples, places them into variables, modifies some header -# fields, appends multiple identical header fields, overwrites the start line -# using several methods, then dumps the initial list of variables and the final -# one, then applies CRC32 to these values as signatures that are easy to test. -# Then it does it again in the backend after saving the current headers into -# the same names prefixed by "fe-". Then it does the same on the response path. -# If some modifications are performed, the crc values need to be adjusted based -# on the failed logs. -# -# Run it with HAPROXY_PROGRAM=$PWD/haproxy varnishtest -l -k -t 1 "$1" - -feature ignore_unknown_macro - -server s1 { - rxreq - txresp \ - -status 234 \ - -hdr "hdr1: val1" \ - -hdr "hdr2: val2a" \ - -hdr "hdr2: val2b" \ - -hdr "hdr3: val3a, val3b" \ - -hdr "hdr4:" \ - -body "This is a body" - - expect req.method == "GET" - expect req.http.fe-sl1-crc == 992395575 - expect req.http.fe-sl2-crc == 1270056220 - expect req.http.fe-hdr-crc == 1719311923 - expect req.http.be-sl1-crc == 2604236007 - expect req.http.be-sl2-crc == 4181358964 - expect req.http.be-hdr-crc == 3634102538 -} -repeat 2 -start - -haproxy h1 -conf { - defaults - mode http - option http-use-htx - timeout connect 1s - timeout client 1s - timeout server 1s - - frontend fe - bind "fd@${feh1}" - bind "fd@${feh2}" proto h2 - - #### requests - http-request set-var(req.method) method - http-request set-var(req.uri) url - http-request set-var(req.path) path - http-request set-var(req.query) query - http-request set-var(req.param) url_param(qs_arg) - - http-request set-header sl1 "sl1: " - - http-request set-method "%[str(GET)]" - http-request set-uri concat(/bu/,req.uri,/eu) - http-request set-path "/bp/%[var(req.path)]/ep" - http-request set-query "bq&%[var(req.query)]&eq" - - http-request set-header sl2 "sl2: " - - http-request set-header sl1 "%[req.fhdr(sl1)] method=<%[var(req.method)]>; uri=<%[var(req.uri)]>; path=<%[var(req.path)]>;" - http-request set-header sl1 "%[req.fhdr(sl1)] query=<%[var(req.query)]>; param=<%[var(req.param)]>" - http-request set-header sl2 "%[req.fhdr(sl2)] method=<%[method]>; uri=<%[url]>; path=<%[path]>; " - http-request set-header sl2 "%[req.fhdr(sl2)] query=<%[query]>; param=<%[url_param(qs_arg)]>" - http-request set-header hdr "%[req.fhdr(hdr)] hdr1=<%[req.hdr(hdr1)]>; fhdr1=<%[req.fhdr(hdr1)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr2=<%[req.hdr(hdr2)]>; fhdr2=<%[req.fhdr(hdr2)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr3=<%[req.hdr(hdr3)]>; fhdr3=<%[req.fhdr(hdr3)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr4=<%[req.hdr(hdr4)]>; fhdr4=<%[req.fhdr(hdr4)]>;" - - http-request set-header sl1-crc "%[req.fhdr(sl1),crc32]" - http-request set-header sl2-crc "%[req.fhdr(sl2),crc32]" - http-request set-header hdr-crc "%[req.fhdr(hdr),crc32]" - - #### responses - http-response set-header be-sl1 "%[res.fhdr(sl1)]" - http-response set-header be-sl2 "%[res.fhdr(sl2)]" - http-response set-header be-hdr "%[res.fhdr(hdr)]" - - http-response set-header be-sl1-crc "%[res.fhdr(sl1-crc)]" - http-response set-header be-sl2-crc "%[res.fhdr(sl2-crc)]" - http-response set-header be-hdr-crc "%[res.fhdr(hdr-crc)]" - - http-response set-var(res.status) status - http-response set-header sl1 "sl1: " - - http-response set-status 200 - - http-response set-header sl2 "sl2: " - - http-response set-header sl1 "%[res.fhdr(sl1)] status=<%[var(res.status)]>;" - http-response set-header sl2 "%[res.fhdr(sl2)] status=<%[status]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr1=<%[res.hdr(hdr1)]>; fhdr1=<%[res.fhdr(hdr1)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr2=<%[res.hdr(hdr2)]>; fhdr2=<%[res.fhdr(hdr2)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr3=<%[res.hdr(hdr3)]>; fhdr3=<%[res.fhdr(hdr3)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr4=<%[res.hdr(hdr4)]>; fhdr4=<%[res.fhdr(hdr4)]>;" - - http-response set-header fe-sl1-crc "%[res.fhdr(sl1),crc32]" - http-response set-header fe-sl2-crc "%[res.fhdr(sl2),crc32]" - http-response set-header fe-hdr-crc "%[res.fhdr(hdr),crc32]" - - default_backend be - - backend be - #### requests - http-request set-header fe-sl1 "%[req.fhdr(sl1)]" - http-request set-header fe-sl2 "%[req.fhdr(sl2)]" - http-request set-header fe-hdr "%[req.fhdr(hdr)]" - - http-request set-header fe-sl1-crc "%[req.fhdr(sl1-crc)]" - http-request set-header fe-sl2-crc "%[req.fhdr(sl2-crc)]" - http-request set-header fe-hdr-crc "%[req.fhdr(hdr-crc)]" - - http-request set-var(req.method) method - http-request set-var(req.uri) url - http-request set-var(req.path) path - http-request set-var(req.query) query - http-request set-var(req.param) url_param(qs_arg) - - http-request set-header sl1 "sl1: " - - http-request set-method "%[str(GET)]" - http-request set-uri concat(/bu/,req.uri,/eu) - http-request set-path "/bp/%[var(req.path)]/ep" - http-request set-query "bq&%[var(req.query)]&eq" - - http-request set-header sl2 "sl2: " - - http-request set-header sl1 "%[req.fhdr(sl1)] method=<%[var(req.method)]>; uri=<%[var(req.uri)]>; path=<%[var(req.path)]>;" - http-request set-header sl1 "%[req.fhdr(sl1)] query=<%[var(req.query)]>; param=<%[var(req.param)]>" - http-request set-header sl2 "%[req.fhdr(sl2)] method=<%[method]>; uri=<%[url]>; path=<%[path]>; " - http-request set-header sl2 "%[req.fhdr(sl2)] query=<%[query]>; param=<%[url_param(qs_arg)]>" - http-request set-header hdr "%[req.fhdr(hdr)] hdr1=<%[req.hdr(hdr1)]>; fhdr1=<%[req.fhdr(hdr1)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr2=<%[req.hdr(hdr2)]>; fhdr2=<%[req.fhdr(hdr2)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr3=<%[req.hdr(hdr3)]>; fhdr3=<%[req.fhdr(hdr3)]>;" - http-request set-header hdr "%[req.fhdr(hdr)] hdr4=<%[req.hdr(hdr4)]>; fhdr4=<%[req.fhdr(hdr4)]>;" - - http-request set-header be-sl1-crc "%[req.fhdr(sl1),crc32]" - http-request set-header be-sl2-crc "%[req.fhdr(sl2),crc32]" - http-request set-header be-hdr-crc "%[req.fhdr(hdr),crc32]" - - #### responses - http-response set-var(res.status) status - http-response set-header sl1 "sl1: " - - http-response set-status 200 - - http-response set-header sl2 "sl2: " - - http-response set-header sl1 "%[res.fhdr(sl1)] status=<%[var(res.status)]>;" - http-response set-header sl2 "%[res.fhdr(sl2)] status=<%[status]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr1=<%[res.hdr(hdr1)]>; fhdr1=<%[res.fhdr(hdr1)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr2=<%[res.hdr(hdr2)]>; fhdr2=<%[res.fhdr(hdr2)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr3=<%[res.hdr(hdr3)]>; fhdr3=<%[res.fhdr(hdr3)]>;" - http-response set-header hdr "%[res.fhdr(hdr)] hdr4=<%[res.hdr(hdr4)]>; fhdr4=<%[res.fhdr(hdr4)]>;" - - http-response set-header sl1-crc "%[res.fhdr(sl1),crc32]" - http-response set-header sl2-crc "%[res.fhdr(sl2),crc32]" - http-response set-header hdr-crc "%[res.fhdr(hdr),crc32]" - - server s1 ${s1_addr}:${s1_port} -} -start - -client c1h1 -connect ${h1_feh1_sock} { - txreq \ - -req GET \ - -url /path/to/file.extension?qs_arg=qs_value \ - -hdr "hdr1: val1" \ - -hdr "hdr2: val2a" \ - -hdr "hdr2: val2b" \ - -hdr "hdr3: val3a, val3b" \ - -hdr "hdr4:" - rxresp - - expect resp.status == 200 - expect resp.http.be-sl1-crc == 487202719 - expect resp.http.be-sl2-crc == 561949791 - expect resp.http.be-hdr-crc == 1719311923 - expect resp.http.fe-sl1-crc == 146151597 - expect resp.http.fe-sl2-crc == 561949791 - expect resp.http.fe-hdr-crc == 3634102538 - expect resp.bodylen == 14 - expect resp.body == "This is a body" -} -run - -client c1h2 -connect ${h1_feh2_sock} { - txpri - stream 0 { - txsettings - rxsettings - txsettings -ack - rxwinup - rxsettings - expect settings.ack == true - } -run - stream 1 { - # warning: -req, -scheme, -url MUST be placed first otherwise - # the H2 protocol is invalid since they are pseudo-headers - txreq \ - -req GET \ - -scheme "https" \ - -url /path/to/file.extension?qs_arg=qs_value \ - -hdr "hdr1" "val1" \ - -hdr "hdr2" " val2a" \ - -hdr "hdr2" " val2b" \ - -hdr "hdr3" " val3a, val3b" \ - -hdr "hdr4" "" - - rxhdrs - expect resp.status == 200 - expect resp.http.be-sl1-crc == 487202719 - expect resp.http.be-sl2-crc == 561949791 - expect resp.http.be-hdr-crc == 1719311923 - expect resp.http.fe-sl1-crc == 146151597 - expect resp.http.fe-sl2-crc == 561949791 - expect resp.http.fe-hdr-crc == 3634102538 - expect resp.http.content-length == 14 - - rxdata -all - expect resp.body == "This is a body" - } -run -} -run diff --git a/reg-tests/lua/b00000.vtc b/reg-tests/lua/b00000.vtc index 5d396a75cd..577329eb30 100644 --- a/reg-tests/lua/b00000.vtc +++ b/reg-tests/lua/b00000.vtc @@ -46,6 +46,7 @@ haproxy h1 -conf { frontend fe1 mode http + ${no-htx} option http-use-htx bind "fd@${fe1}" default_backend b1 @@ -53,6 +54,7 @@ haproxy h1 -conf { backend b1 mode http + ${no-htx} option http-use-htx server s1 ${s1_addr}:${s1_port} } -start diff --git a/reg-tests/lua/b00001.vtc b/reg-tests/lua/b00001.vtc index 4c39e95ed7..588a5e30eb 100644 --- a/reg-tests/lua/b00001.vtc +++ b/reg-tests/lua/b00001.vtc @@ -49,6 +49,7 @@ haproxy h1 -conf { frontend f1 mode http + ${no-htx} option http-use-htx bind "fd@${f1}" log ${Slog_addr}:${Slog_port} daemon log-format Ta=%Ta\ Tc=%Tc\ Td=%Td\ Th=%Th\ Ti=%Ti\ Tq=%Tq\ TR=%TR\ Tr=%Tr\ Tt=%Tt\ Tw=%Tw @@ -56,6 +57,7 @@ haproxy h1 -conf { backend b1 mode http + ${no-htx} option http-use-htx http-request use-service lua.foo.http frontend f2 diff --git a/reg-tests/lua/b00002.vtc b/reg-tests/lua/b00002.vtc index 6f33985f9d..6ab58f6b14 100644 --- a/reg-tests/lua/b00002.vtc +++ b/reg-tests/lua/b00002.vtc @@ -11,17 +11,20 @@ haproxy h1 -conf { frontend fe1 mode http + ${no-htx} option http-use-htx bind "fd@${fe1}" default_backend b1 frontend fe2 mode http + ${no-htx} option http-use-htx bind ":8443" ssl crt ${testdir}/common.pem stats enable stats uri / backend b1 mode http + ${no-htx} option http-use-htx http-request use-service lua.fakeserv } -start diff --git a/reg-tests/lua/b00003.vtc b/reg-tests/lua/b00003.vtc index d785f7799a..89ab499c83 100644 --- a/reg-tests/lua/b00003.vtc +++ b/reg-tests/lua/b00003.vtc @@ -36,6 +36,7 @@ haproxy h1 -conf { log ${Slog_addr}:${Slog_port} local0 debug err log-format Ta=%Ta\ Tc=%Tc\ Td=%Td\ Th=%Th\ Ti=%Ti\ Tq=%Tq\ TR=%TR\ Tr=%Tr\ Tt=%Tt\ Tw=%Tw mode http + ${no-htx} option http-use-htx bind "fd@${frt}" http-request use-service lua.donothing } -start diff --git a/reg-tests/lua/h00001.vtc b/reg-tests/lua/h00001.vtc index 8b9313951b..59774a3342 100644 --- a/reg-tests/lua/h00001.vtc +++ b/reg-tests/lua/h00001.vtc @@ -9,6 +9,7 @@ haproxy h1 -conf { frontend fe1 mode http + ${no-htx} option http-use-htx bind "fd@${fe1}" default_backend b1 @@ -16,6 +17,7 @@ haproxy h1 -conf { backend b1 mode http + ${no-htx} option http-use-htx http-request use-service lua.fakeserv } -start diff --git a/reg-tests/lua/h00002.vtc b/reg-tests/lua/h00002.vtc index c3adc95abc..dfb9b3d691 100644 --- a/reg-tests/lua/h00002.vtc +++ b/reg-tests/lua/h00002.vtc @@ -15,11 +15,13 @@ haproxy h1 -conf { frontend fe1 mode http + ${no-htx} option http-use-htx bind "fd@${fe1}" default_backend b1 backend b1 mode http + ${no-htx} option http-use-htx http-request use-service lua.fakeserv } -start diff --git a/reg-tests/seamless-reload/b00000.vtc b/reg-tests/seamless-reload/b00000.vtc index 8f7acf6449..35ec0e9933 100644 --- a/reg-tests/seamless-reload/b00000.vtc +++ b/reg-tests/seamless-reload/b00000.vtc @@ -22,6 +22,7 @@ haproxy h1 -W -conf { defaults mode http + ${no-htx} option http-use-htx log global option httplog timeout connect 15ms diff --git a/reg-tests/server/b00000.vtc b/reg-tests/server/b00000.vtc index 5fb5c62fd8..831a63d26d 100644 --- a/reg-tests/server/b00000.vtc +++ b/reg-tests/server/b00000.vtc @@ -9,6 +9,7 @@ server s1 { haproxy h1 -conf { defaults mode http + ${no-htx} option http-use-htx timeout connect 1s timeout client 1s timeout server 1s diff --git a/reg-tests/ssl/b00000.vtc b/reg-tests/ssl/b00000.vtc index d1b48fb78e..30030e3617 100644 --- a/reg-tests/ssl/b00000.vtc +++ b/reg-tests/ssl/b00000.vtc @@ -27,6 +27,7 @@ haproxy h1 -conf { listen frt mode http + ${no-htx} option http-use-htx bind "fd@${frt}" ssl crt ${testdir}/common.pem http-request redirect location / } -start diff --git a/reg-tests/stick-table/b00000.vtc b/reg-tests/stick-table/b00000.vtc index 1071bc04fe..58851939d1 100644 --- a/reg-tests/stick-table/b00000.vtc +++ b/reg-tests/stick-table/b00000.vtc @@ -16,6 +16,7 @@ haproxy h0 -conf { frontend test mode http + ${no-htx} option http-use-htx bind "fd@${fe1}" stick-table type ip size 1m expire 1h store gpc0 http-request deny if { src,table_trackers(test) eq 1 } diff --git a/reg-tests/stick-table/b00001.vtc b/reg-tests/stick-table/b00001.vtc index 43e25eb231..3435712ef2 100644 --- a/reg-tests/stick-table/b00001.vtc +++ b/reg-tests/stick-table/b00001.vtc @@ -27,6 +27,7 @@ haproxy h1 -conf { # Configuration file of 'h1' haproxy instance. defaults mode http + ${no-htx} option http-use-htx timeout connect 5s timeout server 30s timeout client 30s