test1073 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <testcase>
  2. # Redirection is used to force curl to realize that the server is
  3. # speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
  4. # because chunked encoding is unavailable, so the request must fail.
  5. <info>
  6. <keywords>
  7. HTTP
  8. HTTP PUT
  9. HTTP/1.0
  10. followlocation
  11. chunked Transfer-Encoding
  12. </keywords>
  13. </info>
  14. # Server-side
  15. <reply>
  16. <data>
  17. HTTP/1.0 301 Redirect swsclose
  18. Server: testcurl
  19. Content-Type: text/plain
  20. Location: /newlocation/10730002
  21. Content-Length: 0
  22. Connection: close
  23. </data>
  24. </reply>
  25. # Client-side
  26. <client>
  27. <server>
  28. http
  29. </server>
  30. <name>
  31. HTTP chunked PUT to HTTP 1.0 server with redirect
  32. </name>
  33. <command>
  34. http://%HOSTIP:%HTTPPORT/1073 -T - -L
  35. </command>
  36. <stdin>
  37. This is data we upload with PUT
  38. it comes from stdin so MUST be sent
  39. with chunked encoding
  40. which is impossible in HTTP/1.0
  41. </stdin>
  42. </client>
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <errorcode>
  46. 25
  47. </errorcode>
  48. <strip>
  49. ^User-Agent:.*
  50. </strip>
  51. <protocol>
  52. PUT /1073 HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. Accept: */*
  55. Transfer-Encoding: chunked
  56. Expect: 100-continue
  57. 7a
  58. This is data we upload with PUT
  59. it comes from stdin so MUST be sent
  60. with chunked encoding
  61. which is impossible in HTTP/1.0
  62. 0
  63. </protocol>
  64. </verify>
  65. </testcase>