mirror of
https://github.com/curl/curl.git
synced 2025-09-18 18:12:49 +03: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:
parent
5ae22272d1
commit
bb9a340c73
|
@ -35,7 +35,7 @@ http
|
||||||
HTTP GET when PROXY Protocol enabled
|
HTTP GET when PROXY Protocol enabled
|
||||||
</name>
|
</name>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol --local-port 37756
|
http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol
|
||||||
</command>
|
</command>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
|
@ -45,8 +45,11 @@ http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol --local-port 37756
|
||||||
<strip>
|
<strip>
|
||||||
^User-Agent:.*
|
^User-Agent:.*
|
||||||
</strip>
|
</strip>
|
||||||
|
<strippart>
|
||||||
|
s/^PROXY TCP4 %CLIENTIP %HOSTIP (\d*) %HTTPPORT/proxy-line/
|
||||||
|
</strippart>
|
||||||
<protocol>
|
<protocol>
|
||||||
PROXY TCP4 %CLIENTIP %HOSTIP 37756 %HTTPPORT
|
proxy-line
|
||||||
GET /1455 HTTP/1.1
|
GET /1455 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
|
@ -4349,9 +4349,11 @@ sub singletest {
|
||||||
# what parts to cut off from the protocol
|
# what parts to cut off from the protocol
|
||||||
my @strippart = getpart("verify", "strippart");
|
my @strippart = getpart("verify", "strippart");
|
||||||
my $strip;
|
my $strip;
|
||||||
|
@strippart = fixarray(@strippart);
|
||||||
for $strip (@strippart) {
|
for $strip (@strippart) {
|
||||||
chomp $strip;
|
chomp $strip;
|
||||||
for(@out) {
|
for(@out) {
|
||||||
|
print STDERR ":::: $strip\n";
|
||||||
eval $strip;
|
eval $strip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user