test3 1007 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP Basic auth
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.0 200 OK
  14. Server: test-server/fake
  15. Content-Type: text/html
  16. Content-Length: 0
  17. this is data even though Content-Length is set to zero
  18. </data>
  19. <datacheck>
  20. HTTP/1.0 200 OK
  21. Server: test-server/fake
  22. Content-Type: text/html
  23. Content-Length: 0
  24. </datacheck>
  25. </reply>
  26. #
  27. # Client-side
  28. <client>
  29. <server>
  30. http
  31. </server>
  32. <name>
  33. HTTP POST with auth and contents but with content-length set to 0
  34. </name>
  35. <command>
  36. -d "fooo=mooo&pooo=clue&doo=%20%20%20++++" -u "fake:-user" http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  37. </command>
  38. </client>
  39. #
  40. # Verify data after the test has been "shot"
  41. <verify>
  42. <protocol nonewline="yes">
  43. POST /%TESTNUMBER HTTP/1.1
  44. Host: %HOSTIP:%HTTPPORT
  45. Authorization: Basic ZmFrZTotdXNlcg==
  46. User-Agent: curl/%VERSION
  47. Accept: */*
  48. Content-Length: 37
  49. Content-Type: application/x-www-form-urlencoded
  50. fooo=mooo&pooo=clue&doo=%20%20%20++++
  51. </protocol>
  52. </verify>
  53. </testcase>