xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP POST |
| 6 | CURLOPT_AWS_SIGV4 |
| 7 | </keywords> |
| 8 | </info> |
| 9 | |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | <data nocheck="yes"> |
| 13 | HTTP/1.1 302 OK |
| 14 | Date: Thu, 09 Nov 2010 14:49:00 GMT |
| 15 | Server: test-server/fake |
| 16 | Content-Type: text/html |
| 17 | Content-Length: 0 |
| 18 | Location: /%TESTNUMBER0002 |
| 19 | |
| 20 | </data> |
| 21 | <data2> |
| 22 | HTTP/1.1 200 OK |
| 23 | Date: Thu, 09 Nov 2010 14:49:00 GMT |
| 24 | Server: test-server/fake |
| 25 | Content-Type: text/html |
| 26 | Content-Length: 0 |
| 27 | |
| 28 | </data2> |
| 29 | </reply> |
| 30 | |
| 31 | # Client-side |
| 32 | <client> |
| 33 | <server> |
| 34 | http |
| 35 | </server> |
| 36 | # this relies on the debug feature which allow to set the time |
| 37 | <features> |
| 38 | SSL |
| 39 | debug |
| 40 | crypto |
| 41 | </features> |
| 42 | |
| 43 | <name> |
| 44 | HTTP POST with AWS_SIGV4 |
| 45 | </name> |
| 46 | <tool> |
| 47 | lib%TESTNUMBER |
| 48 | </tool> |
| 49 | |
| 50 | <command> |
| 51 | http://127.0.0.1:9000/%TESTNUMBER/testapi/test 127.0.0.1:9000:%HOSTIP:%HTTPPORT |
| 52 | </command> |
| 53 | </client> |
| 54 | |
| 55 | # Verify data after the test has been "shot" |
| 56 | <verify> |
| 57 | <strip> |
| 58 | ^User-Agent:.* |
| 59 | ^Content-Type:.* |
| 60 | ^Accept:.* |
| 61 | </strip> |
| 62 | <protocol nonewline="yes"> |
| 63 | POST /%TESTNUMBER/testapi/test HTTP/1.1
|
| 64 | Host: 127.0.0.1:9000
|
| 65 | Authorization: PROVIDER14-HMAC-SHA256 Credential=keyId/19700101/region/service/provider14_request, SignedHeaders=content-type;host;x-provider2-date, Signature=4928ccf97a9e71fe27f91db5a3b3c943b6080d25e6f4df8593d4c38e7d1e849b
|
| 66 | X-Provider2-Date: 19700101T000000Z
|
| 67 | Content-Length: 8
|
| 68 |
|
| 69 | postData |
| 70 | </protocol> |
| 71 | </verify> |
| 72 | </testcase> |