test492 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 '{%LOGDIR/first%TESTNUMBER,%LOGDIR/second%TESTNUMBER}' -H "Testno: %TESTNUMBER"
  36. </command>
  37. <file name="%LOGDIR/first%TESTNUMBER">
  38. first %TESTNUMBER contents
  39. </file>
  40. <file1 name="%LOGDIR/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. first %TESTNUMBER contents
  55. PUT /two/first%TESTNUMBER HTTP/1.1
  56. Host: %HOSTIP:%HTTPPORT
  57. User-Agent: curl/%VERSION
  58. Accept: */*
  59. Testno: %TESTNUMBER
  60. Content-Length: 19
  61. first %TESTNUMBER contents
  62. PUT /one/second%TESTNUMBER HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Testno: %TESTNUMBER
  67. Content-Length: 20
  68. second %TESTNUMBER contents
  69. PUT /two/second%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. User-Agent: curl/%VERSION
  72. Accept: */*
  73. Testno: %TESTNUMBER
  74. Content-Length: 20
  75. second %TESTNUMBER contents
  76. </protocol>
  77. </verify>
  78. </testcase>