test1130 1.9 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: 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. In actuality, the
  30. # long --expect100-timeout means that it will never get a chance to read this.
  31. <servercmd>
  32. skip: 100
  33. </servercmd>
  34. </reply>
  35. #
  36. # Client-side
  37. <client>
  38. # 100 x 'x'
  39. <file name="%LOGDIR/file%TESTNUMBER">
  40. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  41. </file>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP POST forced expect 100-continue with a 404
  47. </name>
  48. <command option="no-output">
  49. -d @%LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue" --expect100-timeout 99
  50. </command>
  51. </client>
  52. #
  53. # Verify data after the test has been "shot"
  54. <verify>
  55. <stdout>
  56. HTTP/1.1 404 NOOOOOOOOO
  57. Date: Tue, 09 Nov 2010 14:49:00 GMT
  58. Server: test-server/fake
  59. Content-Length: 6
  60. Content-Type: text/html
  61. -foo-
  62. HTTP/1.1 404 NEITHER
  63. Date: Tue, 09 Nov 2010 14:49:00 GMT
  64. Server: test-server/fake
  65. Content-Length: 6
  66. Content-Type: text/html
  67. -foo-
  68. </stdout>
  69. <protocol>
  70. POST /%TESTNUMBER HTTP/1.1
  71. Host: %HOSTIP:%HTTPPORT
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Expect: 100-continue
  75. Content-Length: 100
  76. Content-Type: application/x-www-form-urlencoded
  77. POST /%TESTNUMBER0001 HTTP/1.1
  78. Host: %HOSTIP:%HTTPPORT
  79. User-Agent: curl/%VERSION
  80. Accept: */*
  81. Expect: 100-continue
  82. Content-Length: 100
  83. Content-Type: application/x-www-form-urlencoded
  84. </protocol>
  85. </verify>
  86. </testcase>