test1131 1.6 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: Thu, 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: Thu, 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/file1131">
  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/file1131 http://%HOSTIP:%HTTPPORT/1131 -T log/file1131 http://%HOSTIP:%HTTPPORT/11310001
  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: Thu, 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: Thu, 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. <strip>
  69. ^User-Agent:.*
  70. </strip>
  71. <protocol>
  72. PUT /1131 HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. Accept: */*
  75. Content-Length: 100
  76. Expect: 100-continue
  77. PUT /11310001 HTTP/1.1
  78. Host: %HOSTIP:%HTTPPORT
  79. Accept: */*
  80. Content-Length: 100
  81. Expect: 100-continue
  82. </protocol>
  83. </verify>
  84. </testcase>