tests: remove most user-agent filters

Use the %VERSION instead. The user-agent stripping was introduced at the
time before we had %VERSION (introduced in e6b21d4). The tests would
then remove the user-agent header to make them possible to be compared
in a version independent way.

Fixes #19355
Reported-by: Stefan Eissing
Closes #19356
This commit is contained in:
Daniel Stenberg
2025-11-04 11:22:32 +01:00
parent 70a11c6f06
commit 0783ef2348
37 changed files with 12 additions and 72 deletions

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1578
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
CURL /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -59,17 +59,16 @@ proxy
# opens for us, so we can't compare with a known pre-existing number!
<strippart>
s/((https.proxy):(\d+))/$2:12345/
s/^(User-Agent: curl).*/$1/
</strippart>
<proxy crlf="headers">
CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
Host: ftp.site.thru.https.proxy:12345
User-Agent: curl
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
Host: ftp.site.thru.https.proxy:12345
User-Agent: curl
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
</proxy>

View File

@@ -69,22 +69,21 @@ proxy
<strippart>
s/((https.proxy):(\d+))/$2:12345/
s/^(User-Agent: curl).*/$1/
</strippart>
<proxy crlf="headers">
CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
Host: ftp.site.thru.https.proxy:12345
User-Agent: curl
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
Host: ftp.site.thru.https.proxy:12345
User-Agent: curl
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
Host: ftp.site.thru.https.proxy:12345
User-Agent: curl
User-Agent: curl/%VERSION
Proxy-Connection: Keep-Alive
</proxy>

View File

@@ -55,7 +55,6 @@ http://xxx:yyy@127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%H
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -56,7 +56,6 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -56,7 +56,6 @@ http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -54,7 +54,6 @@ http://xxx:yyy@127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%H
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -48,7 +48,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -58,7 +58,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -55,7 +55,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -48,7 +48,6 @@ http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPP
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Type:.*
^Accept:.*
</strip>

View File

@@ -39,7 +39,6 @@ HTTP AWS_SIGV4 canonical request header sorting test
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Length:.*
^Accept:.*
</strip>
@@ -53,6 +52,7 @@ Host: %HOSTIP:%HTTPPORT
Authorization: AWS4-HMAC-SHA256 Credential=xxx/19700101/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-meta-test;x-amz-meta-test-two, Signature=stripped
X-Amz-Date: 19700101T000000Z
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
User-Agent: curl/%VERSION
X-Amz-Meta-Test-Two: test2
x-amz-meta-test: test

View File

@@ -42,7 +42,6 @@ http://xxx:yyy@127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%H
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
^Content-Length:.*
^Accept:.*
</strip>

View File

@@ -40,9 +40,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="headers" nonewline="yes">
POST /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT

View File

@@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --no-progress-meter -X IGLOO -d moo --locat
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooGET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

View File

@@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -X IGLOO -d moo --follow
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooGET /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*

View File

@@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -X IGLOO -d moo --follow
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol crlf="yes" nonewline="yes">
IGLOO /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded
mooIGLOO /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 3
Content-Type: application/x-www-form-urlencoded