test1517 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. POST
  6. POST callback
  7. slow callback
  8. early response
  9. </keywords>
  10. </info>
  11. #
  12. # This reproduces issue #657, fixed with PR #668 - on Windows
  13. #
  14. # Server-side
  15. <reply>
  16. # Force server reply right after request headers, not waiting for request body
  17. <servercmd>
  18. skip: 45
  19. </servercmd>
  20. <data>
  21. HTTP/1.1 500 Internal Server Error
  22. Date: Thu, 17 Mar 2016 14:41:00 GMT
  23. Server: test-server/fake
  24. Content-Type: text/plain; charset=US-ASCII
  25. X-Special: swsclose
  26. Content-Length: 55
  27. Connection: close
  28. This is a virtual description of server virtual error.
  29. </data>
  30. </reply>
  31. # Client-side
  32. <client>
  33. <server>
  34. http
  35. </server>
  36. # tool is what to use instead of 'curl'
  37. <tool>
  38. lib%TESTNUMBER
  39. </tool>
  40. <name>
  41. HTTP POST, server responds before completed send
  42. </name>
  43. <command>
  44. http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  45. </command>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <strippart>
  51. s/^(this is what we post to the silly web server)(\r)?\n//
  52. </strippart>
  53. <protocol>
  54. POST /%TESTNUMBER HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. Accept: */*
  57. Content-Length: 45
  58. Content-Type: application/x-www-form-urlencoded
  59. </protocol>
  60. <errorcode>
  61. 0
  62. </errorcode>
  63. </verify>
  64. </testcase>