test1129 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. Expect: 100-continue
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 404 NOOOOOOOOO
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 6
  17. Content-Type: text/html
  18. -foo-
  19. </data>
  20. <data1>
  21. HTTP/1.1 404 NEITHER
  22. Date: Tue, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 6
  25. Content-Type: text/html
  26. -foo-
  27. </data1>
  28. # we use skip to make the test server never read the full payload off
  29. # the socket and instead return the response at once
  30. <servercmd>
  31. skip: 1053700
  32. </servercmd>
  33. </reply>
  34. #
  35. # Client-side
  36. <client>
  37. # 1053700 x 'x'
  38. <file name="log/file%TESTNUMBER">
  39. %repeat[1053700 x x]%
  40. </file>
  41. <server>
  42. http
  43. </server>
  44. <name>
  45. HTTP POST expect 100-continue with a 404
  46. </name>
  47. <command option="no-output">
  48. -d @log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
  49. </command>
  50. </client>
  51. #
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <stdout>
  55. HTTP/1.1 404 NOOOOOOOOO
  56. Date: Tue, 09 Nov 2010 14:49:00 GMT
  57. Server: test-server/fake
  58. Content-Length: 6
  59. Content-Type: text/html
  60. -foo-
  61. HTTP/1.1 404 NEITHER
  62. Date: Tue, 09 Nov 2010 14:49:00 GMT
  63. Server: test-server/fake
  64. Content-Length: 6
  65. Content-Type: text/html
  66. -foo-
  67. </stdout>
  68. <protocol>
  69. POST /%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. User-Agent: curl/%VERSION
  72. Accept: */*
  73. Content-Length: 1053700
  74. Content-Type: application/x-www-form-urlencoded
  75. Expect: 100-continue
  76. POST /%TESTNUMBER0001 HTTP/1.1
  77. Host: %HOSTIP:%HTTPPORT
  78. User-Agent: curl/%VERSION
  79. Accept: */*
  80. Content-Length: 1053700
  81. Content-Type: application/x-www-form-urlencoded
  82. Expect: 100-continue
  83. </protocol>
  84. </verify>
  85. </testcase>