diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-06-12 15:48:47 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-12 15:48:47 +0200 |
commit | 7f7adf6d55876835702e0b3d840f8066b7f57834 (patch) | |
tree | 0799243387d736e2b91d7d132b7ea63b45d171be | |
parent | 819f44dc07b0b60ea6f52478939dac4206b73146 (diff) | |
download | curl-bagder/test1455.tar.gz |
runtests: support variables in <strippart>bagder/test1455
... and make use of that to make 1455 work better without using a fixed
local port number.
Fixes #2649
-rw-r--r-- | tests/data/test1455 | 7 | ||||
-rwxr-xr-x | tests/runtests.pl | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/data/test1455 b/tests/data/test1455 index 7768a1f89..0b77dc4f5 100644 --- a/tests/data/test1455 +++ b/tests/data/test1455 @@ -35,7 +35,7 @@ http HTTP GET when PROXY Protocol enabled </name> <command> -http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol --local-port 37756 +http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol </command> </client> @@ -45,8 +45,11 @@ http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol --local-port 37756 <strip> ^User-Agent:.* </strip> +<strippart> +s/^PROXY TCP4 %CLIENTIP %HOSTIP (\d*) %HTTPPORT/proxy-line/ +</strippart> <protocol> -PROXY TCP4 %CLIENTIP %HOSTIP 37756 %HTTPPORT
+proxy-line
GET /1455 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
diff --git a/tests/runtests.pl b/tests/runtests.pl index 054c64bf3..92fb447a2 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4349,9 +4349,11 @@ sub singletest { # what parts to cut off from the protocol my @strippart = getpart("verify", "strippart"); my $strip; + @strippart = fixarray(@strippart); for $strip (@strippart) { chomp $strip; for(@out) { + print STDERR ":::: $strip\n"; eval $strip; } } |