xref: /curl/tests/data/test1972 (revision 18f1cd7a)
1<testcase>
2<info>
3<keywords>
4HTTP
5CURLOPT_AWS_SIGV4
6</keywords>
7</info>
8
9# Server-side
10<reply>
11<data nocheck="yes">
12HTTP/1.1 302 OK
13Date: Thu, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Content-Type: text/html
16Content-Length: 0
17Location: /%TESTNUMBER0002
18
19</data>
20<data2>
21HTTP/1.1 200 OK
22Date: Thu, 09 Nov 2010 14:49:00 GMT
23Server: test-server/fake
24Content-Type: text/html
25Content-Length: 0
26
27</data2>
28</reply>
29
30# Client-side
31<client>
32<server>
33http
34</server>
35# this relies on the debug feature which allow to set the time
36<features>
37SSL
38Debug
39crypto
40</features>
41<setenv>
42CURL_FORCEHOST=1
43</setenv>
44
45<name>
46HTTP AWS_SIGV4 for AWS S3: MIMEPOST
47</name>
48<tool>
49lib%TESTNUMBER
50</tool>
51
52<command>
53http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPPORT
54</command>
55</client>
56
57# Verify data after the test has been "shot"
58<verify>
59<strip>
60^User-Agent:.*
61^Content-Type:.*
62^Accept:.*
63</strip>
64<protocol>
65POST /aws_sigv4/testapi/test HTTP/1.1
66Host: exam.ple.com:9000
67Authorization: AWS4-HMAC-SHA256 Credential=xxx/19700101/us-east-1/s3/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=eaee0f1c5984ad5d81c8bc7805f28c7b83b35322de654b2ace18cb8cf6d5a9cb
68X-Amz-Date: 19700101T000000Z
69x-amz-content-sha256: UNSIGNED-PAYLOAD
70Content-Length: 154
71
72--------------------------qrstuvwxyz0123456789AB
73Content-Disposition: attachment; name="foo"
74
75bar
76--------------------------qrstuvwxyz0123456789AB--
77</protocol>
78</verify>
79</testcase>
80