From 0783ef2348f46cd57ce8848e5dc7008d33b70a05 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 4 Nov 2025 11:22:32 +0100 Subject: [PATCH] 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 --- tests/data/test1571 | 3 --- tests/data/test1572 | 3 --- tests/data/test1573 | 3 --- tests/data/test1574 | 3 --- tests/data/test1575 | 3 --- tests/data/test1576 | 3 --- tests/data/test1577 | 3 --- tests/data/test1578 | 3 --- tests/data/test1579 | 3 --- tests/data/test1580 | 3 --- tests/data/test1581 | 3 --- tests/data/test1631 | 5 ++--- tests/data/test1632 | 7 +++---- tests/data/test1933 | 1 - tests/data/test1934 | 1 - tests/data/test1935 | 1 - tests/data/test1936 | 1 - tests/data/test1937 | 1 - tests/data/test1938 | 1 - tests/data/test1955 | 1 - tests/data/test1956 | 1 - tests/data/test1957 | 1 - tests/data/test1958 | 1 - tests/data/test1959 | 1 - tests/data/test1964 | 1 - tests/data/test1970 | 1 - tests/data/test1971 | 1 - tests/data/test1972 | 1 - tests/data/test1973 | 1 - tests/data/test1974 | 1 - tests/data/test1975 | 1 - tests/data/test1976 | 2 +- tests/data/test1978 | 1 - tests/data/test545 | 3 --- tests/data/test794 | 5 ++--- tests/data/test796 | 5 ++--- tests/data/test797 | 5 ++--- 37 files changed, 12 insertions(+), 72 deletions(-) diff --git a/tests/data/test1571 b/tests/data/test1571 index 622ec5ad15..8a2bfb4616 100644 --- a/tests/data/test1571 +++ b/tests/data/test1571 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1572 b/tests/data/test1572 index 36f3eef6e6..53683ed88f 100644 --- a/tests/data/test1572 +++ b/tests/data/test1572 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1573 b/tests/data/test1573 index 62f5a0e88e..e13522964f 100644 --- a/tests/data/test1573 +++ b/tests/data/test1573 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1574 b/tests/data/test1574 index 501c405389..fe4d7688c5 100644 --- a/tests/data/test1574 +++ b/tests/data/test1574 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1575 b/tests/data/test1575 index d02080b2da..53452af2c2 100644 --- a/tests/data/test1575 +++ b/tests/data/test1575 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1576 b/tests/data/test1576 index 8048e1329d..fc24dd3e5e 100644 --- a/tests/data/test1576 +++ b/tests/data/test1576 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - CURL /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1577 b/tests/data/test1577 index 42d26ae46d..eeb3119fdc 100644 --- a/tests/data/test1577 +++ b/tests/data/test1577 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - CURL /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1578 b/tests/data/test1578 index a8c9e7925a..b8e7c308c0 100644 --- a/tests/data/test1578 +++ b/tests/data/test1578 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - CURL /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1579 b/tests/data/test1579 index 309f17a8bb..c835eaf70e 100644 --- a/tests/data/test1579 +++ b/tests/data/test1579 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER %TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - CURL /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1580 b/tests/data/test1580 index e67164a427..99626c53a2 100644 --- a/tests/data/test1580 +++ b/tests/data/test1580 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER 1578 # Verify data after the test has been "shot" - -^User-Agent:.* - CURL /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1581 b/tests/data/test1581 index 5dac5229f4..f3f29757a2 100644 --- a/tests/data/test1581 +++ b/tests/data/test1581 @@ -75,9 +75,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # Verify data after the test has been "shot" - -^User-Agent:.* - IGLOO /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test1631 b/tests/data/test1631 index 7c2f81c3ee..6e28263b3d 100644 --- a/tests/data/test1631 +++ b/tests/data/test1631 @@ -59,17 +59,16 @@ proxy # opens for us, so we can't compare with a known pre-existing number! s/((https.proxy):(\d+))/$2:12345/ -s/^(User-Agent: curl).*/$1/ 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 diff --git a/tests/data/test1632 b/tests/data/test1632 index 90cb56f616..ebf91098d5 100644 --- a/tests/data/test1632 +++ b/tests/data/test1632 @@ -69,22 +69,21 @@ proxy s/((https.proxy):(\d+))/$2:12345/ -s/^(User-Agent: curl).*/$1/ 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 diff --git a/tests/data/test1933 b/tests/data/test1933 index a26d29585c..57706dcf92 100644 --- a/tests/data/test1933 +++ b/tests/data/test1933 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1934 b/tests/data/test1934 index 9520c8193e..a5bead447b 100644 --- a/tests/data/test1934 +++ b/tests/data/test1934 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1935 b/tests/data/test1935 index 4e0f11cb4f..64f0c21e06 100644 --- a/tests/data/test1935 +++ b/tests/data/test1935 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1936 b/tests/data/test1936 index d57b8161ef..3ee3788f2c 100644 --- a/tests/data/test1936 +++ b/tests/data/test1936 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1937 b/tests/data/test1937 index 816b9c18d7..72fce57c54 100644 --- a/tests/data/test1937 +++ b/tests/data/test1937 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1938 b/tests/data/test1938 index e2ed9837e8..7f719376e2 100644 --- a/tests/data/test1938 +++ b/tests/data/test1938 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1955 b/tests/data/test1955 index be23a9d628..93d1422e8b 100644 --- a/tests/data/test1955 +++ b/tests/data/test1955 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1956 b/tests/data/test1956 index 324de33913..b8c4710f98 100644 --- a/tests/data/test1956 +++ b/tests/data/test1956 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1957 b/tests/data/test1957 index 5a3c914b5b..0036b60644 100644 --- a/tests/data/test1957 +++ b/tests/data/test1957 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1958 b/tests/data/test1958 index 220f49aa5e..f5e38868c6 100644 --- a/tests/data/test1958 +++ b/tests/data/test1958 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1959 b/tests/data/test1959 index e91a3128e8..8f43ed625c 100644 --- a/tests/data/test1959 +++ b/tests/data/test1959 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1964 b/tests/data/test1964 index 9b7e2c968b..5cadbee5bc 100644 --- a/tests/data/test1964 +++ b/tests/data/test1964 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1970 b/tests/data/test1970 index 43df45e31f..af15223599 100644 --- a/tests/data/test1970 +++ b/tests/data/test1970 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1971 b/tests/data/test1971 index 57cb834e95..52320d4344 100644 --- a/tests/data/test1971 +++ b/tests/data/test1971 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1972 b/tests/data/test1972 index 7b4168d119..d16ed4f775 100644 --- a/tests/data/test1972 +++ b/tests/data/test1972 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1973 b/tests/data/test1973 index 8b10e9ec48..7c45ceb5d6 100644 --- a/tests/data/test1973 +++ b/tests/data/test1973 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1974 b/tests/data/test1974 index 74213d0ab6..bac259715e 100644 --- a/tests/data/test1974 +++ b/tests/data/test1974 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1975 b/tests/data/test1975 index 92fd563da8..e5a29d2936 100644 --- a/tests/data/test1975 +++ b/tests/data/test1975 @@ -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" -^User-Agent:.* ^Content-Type:.* ^Accept:.* diff --git a/tests/data/test1976 b/tests/data/test1976 index 51e3b242b8..b573bf7ded 100644 --- a/tests/data/test1976 +++ b/tests/data/test1976 @@ -39,7 +39,6 @@ HTTP AWS_SIGV4 canonical request header sorting test # Verify data after the test has been "shot" -^User-Agent:.* ^Content-Length:.* ^Accept:.* @@ -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 diff --git a/tests/data/test1978 b/tests/data/test1978 index 007bbac55c..a6c1272d9a 100644 --- a/tests/data/test1978 +++ b/tests/data/test1978 @@ -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" -^User-Agent:.* ^Content-Length:.* ^Accept:.* diff --git a/tests/data/test545 b/tests/data/test545 index 363fe4dd7f..99bf046851 100644 --- a/tests/data/test545 +++ b/tests/data/test545 @@ -40,9 +40,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER # # Verify data after the test has been "shot" - -^User-Agent:.* - POST /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT diff --git a/tests/data/test794 b/tests/data/test794 index 63d3d36ba0..5fd1f76a06 100644 --- a/tests/data/test794 +++ b/tests/data/test794 @@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER --no-progress-meter -X IGLOO -d moo --locat # Verify data after the test has been "shot" - -^User-Agent:.* - 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: */* diff --git a/tests/data/test796 b/tests/data/test796 index e875058810..b945556a46 100644 --- a/tests/data/test796 +++ b/tests/data/test796 @@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -X IGLOO -d moo --follow # Verify data after the test has been "shot" - -^User-Agent:.* - 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: */* diff --git a/tests/data/test797 b/tests/data/test797 index f1f1a1ff18..2033829d14 100644 --- a/tests/data/test797 +++ b/tests/data/test797 @@ -72,18 +72,17 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -X IGLOO -d moo --follow # Verify data after the test has been "shot" - -^User-Agent:.* - 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 -- 2.47.3