test1975 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 100 Continue
  12. HTTP/1.1 200 OK
  13. Date: Thu, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Type: text/html
  16. Content-Length: 0
  17. </data>
  18. </reply>
  19. # Client-side
  20. <client>
  21. <server>
  22. http
  23. </server>
  24. # this relies on the debug feature which allow to set the time
  25. <features>
  26. SSL
  27. debug
  28. crypto
  29. </features>
  30. <setenv>
  31. CURL_FORCEHOST=1
  32. </setenv>
  33. <name>
  34. HTTP AWS_SIGV4 for AWS S3: UPLOAD with given x-amz-content-sha256
  35. </name>
  36. <tool>
  37. lib%TESTNUMBER
  38. </tool>
  39. <command>
  40. http://exam.ple.com:9000/aws_sigv4/testapi/test exam.ple.com:9000:%HOSTIP:%HTTPPORT
  41. </command>
  42. </client>
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <strip>
  46. ^User-Agent:.*
  47. ^Content-Type:.*
  48. ^Accept:.*
  49. </strip>
  50. <protocol>
  51. PUT /aws_sigv4/testapi/test HTTP/1.1
  52. Host: exam.ple.com:9000
  53. 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=a028756f42a859122e9609c1f90cae4b272d6b03bf60d9fd354138176dfa2260
  54. X-Amz-Date: 19700101T000000Z
  55. Transfer-Encoding: chunked
  56. X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  57. Expect: 100-continue
  58. 0
  59. </protocol>
  60. </verify>
  61. </testcase>