test1131 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. Expect: 100-continue
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 400 NOOOOOOOOO
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 9
  17. Content-Type: text/html
  18. FAILURE1
  19. </data>
  20. <data1>
  21. HTTP/1.1 400 NEITHER
  22. Date: Tue, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Length: 9
  25. Content-Type: text/html
  26. FAILURE2
  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/file%TESTNUMBER">
  39. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  40. </file>
  41. <server>
  42. http
  43. </server>
  44. <name>
  45. HTTP PUT expect 100-continue with a 400
  46. </name>
  47. <command option="no-output">
  48. -T log/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/file%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 400 NOOOOOOOOO
  56. Date: Tue, 09 Nov 2010 14:49:00 GMT
  57. Server: test-server/fake
  58. Content-Length: 9
  59. Content-Type: text/html
  60. FAILURE1
  61. HTTP/1.1 400 NEITHER
  62. Date: Tue, 09 Nov 2010 14:49:00 GMT
  63. Server: test-server/fake
  64. Content-Length: 9
  65. Content-Type: text/html
  66. FAILURE2
  67. </stdout>
  68. <protocol>
  69. PUT /%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. User-Agent: curl/%VERSION
  72. Accept: */*
  73. Content-Length: 100
  74. Expect: 100-continue
  75. PUT /%TESTNUMBER0001 HTTP/1.1
  76. Host: %HOSTIP:%HTTPPORT
  77. User-Agent: curl/%VERSION
  78. Accept: */*
  79. Content-Length: 100
  80. Expect: 100-continue
  81. </protocol>
  82. </verify>
  83. </testcase>