test1041 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 OK swsclose
  15. Date: Thu, 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="log/test1041.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/1041 -Tlog/test1041.txt -C -
  45. </command>
  46. </client>
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <strip>
  50. ^User-Agent:.*
  51. </strip>
  52. # curl doesn't do a HEAD request on the remote file so it has no idea whether
  53. # it can skip part of the file or not. Instead, it sends the entire file.
  54. <protocol>
  55. PUT /1041 HTTP/1.1
  56. Content-Range: bytes 0-99/100
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. Content-Length: 100
  60. Expect: 100-continue
  61. 012345678
  62. 012345678
  63. 012345678
  64. 012345678
  65. 012345678
  66. 012345678
  67. 012345678
  68. 012345678
  69. 012345678
  70. 012345678
  71. </protocol>
  72. </verify>
  73. </testcase>