test3 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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/3
  37. </command>
  38. </client>
  39. #
  40. # Verify data after the test has been "shot"
  41. <verify>
  42. <strip>
  43. ^User-Agent:.*
  44. </strip>
  45. <protocol nonewline="yes">
  46. POST /3 HTTP/1.1
  47. Authorization: Basic ZmFrZTotdXNlcg==
  48. Host: %HOSTIP:%HTTPPORT
  49. Accept: */*
  50. Content-Length: 37
  51. Content-Type: application/x-www-form-urlencoded
  52. fooo=mooo&pooo=clue&doo=%20%20%20++++
  53. </protocol>
  54. </verify>
  55. </testcase>