1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<?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>
|