]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: Add option to use HTX prefixed by the macro 'no-htx'
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 19 Dec 2018 10:49:39 +0000 (11:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 20 Dec 2018 09:37:32 +0000 (10:37 +0100)
So some tests have been removed.

21 files changed:
reg-tests/cache/h00000.vtc
reg-tests/connection/b00000.vtc
reg-tests/connection/h00001.vtc
reg-tests/http-cookies/h00000.vtc
reg-tests/http-messaging/h00000.vtc
reg-tests/http-messaging/h00001.vtc [deleted file]
reg-tests/http-messaging/h00002.vtc
reg-tests/http-messaging/h00003.vtc [deleted file]
reg-tests/http-rules/h00001.vtc
reg-tests/http-rules/h00002.vtc [deleted file]
reg-tests/lua/b00000.vtc
reg-tests/lua/b00001.vtc
reg-tests/lua/b00002.vtc
reg-tests/lua/b00003.vtc
reg-tests/lua/h00001.vtc
reg-tests/lua/h00002.vtc
reg-tests/seamless-reload/b00000.vtc
reg-tests/server/b00000.vtc
reg-tests/ssl/b00000.vtc
reg-tests/stick-table/b00000.vtc
reg-tests/stick-table/b00001.vtc

index 100c860e43e079d2030ce0e32e94da9f2acf9c51..e8255af5132a28eca64235931b6e243f980ce39a 100644 (file)
@@ -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
index 50bb749448621d912a6425b67add8f5b7ba7e1f7..674cadd0b9267c16ca02b4e35fef6f9dc9731f2b 100644 (file)
@@ -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
index fccd6ec4b964fe01bfb8010f8a936ac65e0c5c29..bac19d8fdfdf3bcec92037097f90bb971ef2dc3d 100644 (file)
@@ -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
 
index 3ea16acc0ed39c297ec3bda3307d85b68f14e8e7..f599a0f12564533e72d17cdced0c3e84f0c0d9e5 100644 (file)
@@ -31,6 +31,7 @@ haproxy h1 -conf {
 
     defaults
         mode http
+        ${no-htx} option http-use-htx
                option httplog
         timeout client 1s
         timeout server 1s
index 3954f3623a6d0d6e4bd161a735fdf8586a69ac9e..951a926fc4699f90f5106f6bfa9b0d1d38bb09eb 100644 (file)
@@ -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 (file)
index 65b2ce0..0000000
+++ /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
index 6fc536aed5f35291c434019727b434e254cf0a23..27d25402e83d132e5a9f3128999d3b92b08505b6 100644 (file)
@@ -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 (file)
index ec11756..0000000
+++ /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
index 2056ea732a7d91d274d3121804a7e19ec81e1d5e..ebe8b576ecc0dc50154b0c2ebb11c1a7bd6e54da 100644 (file)
@@ -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 (file)
index 1f3c29d..0000000
+++ /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
index 5d396a75cd84201867740838ef8c2d110f421c8c..577329eb3070b520135ca9369045ca555afa8028 100644 (file)
@@ -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
index 4c39e95ed7e838747e88e4382830f35625a915b4..588a5e30ebfd495ee822747eba2a562573024652 100644 (file)
@@ -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
index 6f33985f9d25d6817019d1521fe19270d16e6b52..6ab58f6b14e38605649f7c6571b48799c0148c0f 100644 (file)
@@ -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
 
index d785f7799a80ffe7c8c767d221d752281ff75b9b..89ab499c835de714a70494017e8d4db3c8e7b4e6 100644 (file)
@@ -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
index 8b9313951b878c58a30c2053c83e0600fb287e7b..59774a33424860b26ffcbd65e7ed02d6db42a210 100644 (file)
@@ -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
 
index c3adc95abc5683cd19a97dfb82be5398bdfb7a0c..dfb9b3d691af67161bc14290b3be003251a11a0b 100644 (file)
@@ -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
index 8f7acf64498532228b17cb338919939766fb3932..35ec0e9933c6ecdcc50974c008f6252937b0668d 100644 (file)
@@ -22,6 +22,7 @@ haproxy h1 -W -conf {
 
   defaults
     mode http
+    ${no-htx} option http-use-htx
     log global
     option httplog
     timeout connect         15ms
index 5fb5c62fd86a759e18819ccbcc3a606600f18ccd..831a63d26d4816200c9636895863cf7f0af994b0 100644 (file)
@@ -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
index d1b48fb78e51e4ae7546b97eccd9bd0a2ebca0c4..30030e3617a2a254fb9277e1dd6a8e393acfe329 100644 (file)
@@ -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
index 1071bc04fe42e7c4dcd779ea49a901f932fa1c04..58851939d17c4b129ffa9d86a602ab7e00d12df2 100644 (file)
@@ -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 }
index 43e25eb231b8c386dd82a1bdf05952acbd412986..3435712ef275eb6bab6f1baaffa700eb63b939f2 100644 (file)
@@ -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