curl-curl/tests/data/test1976
Viktor Szakats b5ea0736bb
tests/data: add XML prolog to test files
To formalize they are now XML-compliant (with some asterisks.)

Also to help syntax highlighters work on them to make their content more
readable.

Also:
- Delete empty comment decorations.
- GHA/checksrc: simplify XML check.
- runtests: fail to load test data with XML prolog missing.

Follow-up to bfe6eb1c06 #19927
Follow-up to 87ba80a6df

Closes #19946
2025-12-12 17:17:24 +01:00

63 lines
1.3 KiB
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
CURLOPT_AWS_SIGV4
</keywords>
</info>
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Length: 0
</data>
</reply>
# Client-side
<client>
<server>
http
</server>
<features>
SSL
Debug
crypto
aws
</features>
<name>
HTTP AWS_SIGV4 canonical request header sorting test
</name>
<command>
-X PUT -H "X-Amz-Meta-Test-Two: test2" -H "x-amz-meta-test: test" --aws-sigv4 "aws:amz:us-east-1:s3" -u "xxx:yyy" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strip>
^Content-Length:.*
^Accept:.*
</strip>
<strippart>
# Strip the actual signature. We only care about header order in this test
s/Signature=[a-f0-9]{64}/Signature=stripped/
</strippart>
<protocol crlf="headers">
PUT /%TESTNUMBER HTTP/1.1
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
</protocol>
</verify>
</testcase>