1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

runtests: support variables in <strippart>

... and make use of that to make 1455 work better without using a fixed
local port number.

Fixes #2649
Closes #2650
This commit is contained in:
Daniel Stenberg 2018-06-12 15:48:47 +02:00
parent 5ae22272d1
commit bb9a340c73
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 2 deletions

View File

@ -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: */*

View File

@ -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;
}
}