test1295 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data nocheck="yes">
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  16. ETag: "21025-dc7-39462498"
  17. Accept-Ranges: bytes
  18. Content-Length: 6
  19. Connection: close
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. -foo-
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <features>
  29. debug
  30. </features>
  31. <server>
  32. http
  33. </server>
  34. <name>
  35. HTTP POST with split initial request send
  36. </name>
  37. <setenv>
  38. # The Hound of the Baskervilles
  39. #
  40. # make the first send cut off after this amount of data
  41. CURL_SMALLREQSEND=100
  42. </setenv>
  43. <command>
  44. http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER -H "012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679: 300" -d "Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table." -w '%{size_upload}\n'
  45. </command>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <protocol nonewline="yes">
  51. POST /012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/%TESTNUMBER HTTP/1.1
  52. Host: %HOSTIP:%HTTPPORT
  53. User-Agent: curl/%VERSION
  54. Accept: */*
  55. 012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679: 300
  56. Content-Length: 165
  57. Content-Type: application/x-www-form-urlencoded
  58. Mr. Sherlock Holmes, who was usually very late in the mornings, save upon those not infrequent occasions when he was up all night, was seated at the breakfast table.
  59. </protocol>
  60. <stdout>
  61. HTTP/1.1 200 OK
  62. Date: Tue, 09 Nov 2010 14:49:00 GMT
  63. Server: test-server/fake
  64. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  65. ETag: "21025-dc7-39462498"
  66. Accept-Ranges: bytes
  67. Content-Length: 6
  68. Connection: close
  69. Content-Type: text/html
  70. Funny-head: yesyes
  71. -foo-
  72. 165
  73. </stdout>
  74. </verify>
  75. </testcase>