test1970 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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: UPLOAD with INFILESIZE=0
  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. PUT /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=a028756f42a859122e9609c1f90cae4b272d6b03bf60d9fd354138176dfa2260
  61. X-Amz-Date: 19700101T000000Z
  62. x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
  63. Content-Length: 0
  64. </protocol>
  65. </verify>
  66. </testcase>