test60 798 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. chunked Transfer-Encoding
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.0 200 OK swsclose
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. blablabla
  16. </data>
  17. </reply>
  18. # Client-side
  19. <client>
  20. <server>
  21. http
  22. </server>
  23. <name>
  24. HTTP PUT from stdin with wrong content-length
  25. </name>
  26. <command>
  27. http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T - -H "Content-Length: 1"
  28. </command>
  29. <stdin>
  30. more than one byte
  31. </stdin>
  32. </client>
  33. # Verify data after the test has been "shot"
  34. <verify>
  35. <protocol>
  36. PUT /bzz/%TESTNUMBER HTTP/1.1
  37. Host: %HOSTIP:%HTTPPORT
  38. User-Agent: curl/%VERSION
  39. Accept: */*
  40. Transfer-Encoding: chunked
  41. %if !hyper
  42. Content-Length: 1
  43. %endif
  44. Expect: 100-continue
  45. 13
  46. more than one byte
  47. 0
  48. </protocol>
  49. </verify>
  50. </testcase>