test1041 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <testcase>
  2. # Similar to test33
  3. <info>
  4. <keywords>
  5. HTTP
  6. HTTP PUT
  7. Resume
  8. Content-Range
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 200 OK swsclose
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Server: test-server/fake
  17. Accept-Ranges: bytes
  18. Content-Length: 0
  19. Connection: close
  20. Content-Type: text/html
  21. </data>
  22. </reply>
  23. # Client-side
  24. <client>
  25. <server>
  26. http
  27. </server>
  28. <name>
  29. HTTP PUT with resume from end of already-uploaded file
  30. </name>
  31. <file name="%LOGDIR/test%TESTNUMBER.txt">
  32. 012345678
  33. 012345678
  34. 012345678
  35. 012345678
  36. 012345678
  37. 012345678
  38. 012345678
  39. 012345678
  40. 012345678
  41. 012345678
  42. </file>
  43. <command>
  44. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T%LOGDIR/test%TESTNUMBER.txt -C -
  45. </command>
  46. </client>
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. # curl doesn't do a HEAD request on the remote file so it has no idea whether
  50. # it can skip part of the file or not. Instead, it sends the entire file.
  51. <protocol>
  52. PUT /%TESTNUMBER HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. Content-Range: bytes 0-99/100
  55. User-Agent: curl/%VERSION
  56. Accept: */*
  57. Content-Length: 100
  58. 012345678
  59. 012345678
  60. 012345678
  61. 012345678
  62. 012345678
  63. 012345678
  64. 012345678
  65. 012345678
  66. 012345678
  67. 012345678
  68. </protocol>
  69. </verify>
  70. </testcase>