test1972 1.5 KB

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