test194 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 swsclose
  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. Connection: close
  23. bad
  24. </data>
  25. <datacheck>
  26. HTTP/1.1 416 Requested Range Not Satisfiable swsclose
  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. Connection: close
  36. </datacheck>
  37. </reply>
  38. # Client-side
  39. <client>
  40. <server>
  41. http
  42. </server>
  43. <name>
  44. HTTP resume transfer with the whole file already downloaded and --fail
  45. </name>
  46. <command>
  47. http://%HOSTIP:%HTTPPORT/want/194 -C 87 --fail
  48. </command>
  49. </client>
  50. # Verify data after the test has been "shot"
  51. <verify>
  52. <strip>
  53. ^User-Agent:.*
  54. </strip>
  55. <protocol>
  56. GET /want/194 HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Range: bytes=87-
  59. Accept: */*
  60. </protocol>
  61. # CURLE_HTTP_RETURNED_ERROR
  62. <errorcode>
  63. 22
  64. </errorcode>
  65. </verify>
  66. </testcase>