test1130 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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: Thu, 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: Thu, 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: 100
  32. </servercmd>
  33. </reply>
  34. #
  35. # Client-side
  36. <client>
  37. # 100 x 'x'
  38. <file name="log/file1130">
  39. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  40. </file>
  41. <server>
  42. http
  43. </server>
  44. <name>
  45. HTTP POST forced expect 100-continue with a 404
  46. </name>
  47. <command option="no-output">
  48. -d @log/file1130 http://%HOSTIP:%HTTPPORT/1130 http://%HOSTIP:%HTTPPORT/11300001 -H "Expect: 100-continue"
  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: Thu, 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: Thu, 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. <strip>
  69. ^User-Agent:.*
  70. </strip>
  71. <protocol>
  72. POST /1130 HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. Accept: */*
  75. Expect: 100-continue
  76. Content-Length: 100
  77. Content-Type: application/x-www-form-urlencoded
  78. POST /11300001 HTTP/1.1
  79. Host: %HOSTIP:%HTTPPORT
  80. Accept: */*
  81. Expect: 100-continue
  82. Content-Length: 100
  83. Content-Type: application/x-www-form-urlencoded
  84. </protocol>
  85. </verify>
  86. </testcase>