test92 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/%TESTNUMBER -C 87
  47. </command>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <protocol>
  52. GET /want/%TESTNUMBER HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. Range: bytes=87-
  55. User-Agent: curl/%VERSION
  56. Accept: */*
  57. </protocol>
  58. </verify>
  59. </testcase>