test357 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. Expect
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. # 417 means the server didn't like the Expect header
  12. <data>
  13. HTTP/1.1 417 OK swsbounce
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 0
  17. </data>
  18. <data1>
  19. HTTP/1.1 200 OK
  20. Date: Tue, 09 Nov 2010 14:49:00 GMT
  21. Server: test-server/fake
  22. Content-Length: 10
  23. blablabla
  24. </data1>
  25. <datacheck>
  26. HTTP/1.1 417 OK swsbounce
  27. Date: Tue, 09 Nov 2010 14:49:00 GMT
  28. Server: test-server/fake
  29. Content-Length: 0
  30. HTTP/1.1 200 OK
  31. Date: Tue, 09 Nov 2010 14:49:00 GMT
  32. Server: test-server/fake
  33. Content-Length: 10
  34. blablabla
  35. </datacheck>
  36. <servercmd>
  37. no-expect
  38. </servercmd>
  39. </reply>
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. </server>
  45. <name>
  46. HTTP PUT with Expect: 100-continue and 417 response
  47. </name>
  48. <command>
  49. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T log/test%TESTNUMBER.txt
  50. </command>
  51. <file name="log/test%TESTNUMBER.txt">
  52. Weird
  53. file
  54. to
  55. upload
  56. for
  57. testing
  58. the
  59. PUT
  60. feature
  61. </file>
  62. </client>
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <protocol>
  66. PUT /we/want/%TESTNUMBER HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. User-Agent: curl/%VERSION
  69. Accept: */*
  70. Content-Length: 78
  71. Expect: 100-continue
  72. PUT /we/want/%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. Content-Length: 78
  77. Weird
  78. file
  79. to
  80. upload
  81. for
  82. testing
  83. the
  84. PUT
  85. feature
  86. </protocol>
  87. </verify>
  88. </testcase>