xref: /curl/tests/data/test1976 (revision cf3e3d93)
1<testcase>
2<info>
3<keywords>
4HTTP
5CURLOPT_AWS_SIGV4
6</keywords>
7</info>
8
9# Server-side
10<reply>
11<data>
12HTTP/1.1 200 OK
13Date: Thu, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Content-Length: 0
16
17</data>
18</reply>
19
20# Client-side
21<client>
22<server>
23http
24</server>
25<features>
26SSL
27Debug
28crypto
29</features>
30<name>
31HTTP AWS_SIGV4 canonical request header sorting test
32</name>
33<command>
34-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
35</command>
36</client>
37
38# Verify data after the test has been "shot"
39<verify>
40<strip>
41^User-Agent:.*
42^Content-Length:.*
43^Accept:.*
44</strip>
45<strippart>
46# Strip the actual signature. We only care about header order in this test
47s/Signature=[a-f0-9]{64}/Signature=stripped/
48</strippart>
49<protocol crlf="yes">
50PUT /%TESTNUMBER HTTP/1.1
51Host: %HOSTIP:%HTTPPORT
52Authorization: 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
53X-Amz-Date: 19700101T000000Z
54x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
55X-Amz-Meta-Test-Two: test2
56x-amz-meta-test: test
57
58</protocol>
59</verify>
60</testcase>
61