test1131 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. 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. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  41. </file>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP PUT expect 100-continue with a 400
  47. </name>
  48. <command option="no-output">
  49. -H "Expect: 100-continue" -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 --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 400 NOOOOOOOOO
  57. Date: Tue, 09 Nov 2010 14:49:00 GMT
  58. Server: test-server/fake
  59. Content-Length: 9
  60. Content-Type: text/html
  61. FAILURE1
  62. HTTP/1.1 400 NEITHER
  63. Date: Tue, 09 Nov 2010 14:49:00 GMT
  64. Server: test-server/fake
  65. Content-Length: 9
  66. Content-Type: text/html
  67. FAILURE2
  68. </stdout>
  69. <protocol>
  70. PUT /%TESTNUMBER HTTP/1.1
  71. Host: %HOSTIP:%HTTPPORT
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Expect: 100-continue
  75. Content-Length: 100
  76. PUT /%TESTNUMBER0001 HTTP/1.1
  77. Host: %HOSTIP:%HTTPPORT
  78. User-Agent: curl/%VERSION
  79. Accept: */*
  80. Expect: 100-continue
  81. Content-Length: 100
  82. </protocol>
  83. </verify>
  84. </testcase>