test92 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. Content-Range
  7. Resume
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 416 Requested Range Not Satisfiable
  14. Date: Fri, 24 Oct 2003 21:33:12 GMT
  15. Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
  16. Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT
  17. ETag: "ab57a-507-3f9968f3"
  18. Accept-Ranges: bytes
  19. Content-Length: 4
  20. Content-Range: bytes */87
  21. Content-Type: image/gif
  22. bad
  23. </data>
  24. # The body should be ignored.
  25. <datacheck>
  26. HTTP/1.1 416 Requested Range Not Satisfiable
  27. Date: Fri, 24 Oct 2003 21:33:12 GMT
  28. Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
  29. Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT
  30. ETag: "ab57a-507-3f9968f3"
  31. Accept-Ranges: bytes
  32. Content-Length: 4
  33. Content-Range: bytes */87
  34. Content-Type: image/gif
  35. </datacheck>
  36. </reply>
  37. # Client-side
  38. <client>
  39. <server>
  40. http
  41. </server>
  42. <name>
  43. HTTP resume transfer with the whole file already downloaded
  44. </name>
  45. <command>
  46. http://%HOSTIP:%HTTPPORT/want/92 -C 87
  47. </command>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strip>
  52. ^User-Agent:.*
  53. </strip>
  54. <protocol>
  55. GET /want/92 HTTP/1.1
  56. Host: %HOSTIP:%HTTPPORT
  57. Range: bytes=87-
  58. Accept: */*
  59. </protocol>
  60. </verify>
  61. </testcase>