test492 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  16. ETag: "21025-dc7-39462498"
  17. Accept-Ranges: bytes
  18. Content-Length: 6
  19. Connection: close
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. -foo-
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. <name>
  32. Two globbed HTTP PUTs to two globbed URLs
  33. </name>
  34. <command>
  35. 'http://%HOSTIP:%HTTPPORT/{one,two}/' -T '{log/first%TESTNUMBER,log/second%TESTNUMBER}' -H "Testno: %TESTNUMBER"
  36. </command>
  37. <file name="log/first%TESTNUMBER">
  38. first %TESTNUMBER contents
  39. </file>
  40. <file1 name="log/second%TESTNUMBER">
  41. second %TESTNUMBER contents
  42. </file1>
  43. </client>
  44. #
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <protocol>
  48. PUT /one/first%TESTNUMBER HTTP/1.1
  49. Host: %HOSTIP:%HTTPPORT
  50. User-Agent: curl/%VERSION
  51. Accept: */*
  52. Testno: %TESTNUMBER
  53. Content-Length: 19
  54. Expect: 100-continue
  55. first %TESTNUMBER contents
  56. PUT /two/first%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. User-Agent: curl/%VERSION
  59. Accept: */*
  60. Testno: %TESTNUMBER
  61. Content-Length: 19
  62. Expect: 100-continue
  63. first %TESTNUMBER contents
  64. PUT /one/second%TESTNUMBER HTTP/1.1
  65. Host: %HOSTIP:%HTTPPORT
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. Testno: %TESTNUMBER
  69. Content-Length: 20
  70. Expect: 100-continue
  71. second %TESTNUMBER contents
  72. PUT /two/second%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. Testno: %TESTNUMBER
  77. Content-Length: 20
  78. Expect: 100-continue
  79. second %TESTNUMBER contents
  80. </protocol>
  81. </verify>
  82. </testcase>