test1117 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. Range
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data nocheck="yes">
  12. HTTP/1.1 416 Requested Range Not Satisfiable
  13. Date: Thu, 09 Sep 2010 14:49:00 GMT
  14. Accept-Ranges: bytes
  15. Content-Length: 115
  16. This is a long error message that is large enough that the test server is
  17. guaranteed to split it into two packets.
  18. </data>
  19. <data1>
  20. HTTP/1.1 206 Partial Content
  21. Date: Thu, 09 Sep 2010 14:49:01 GMT
  22. Accept-Ranges: bytes
  23. Content-Range: bytes 10-18/155
  24. Content-Length: 13
  25. Content-Type: text/plain
  26. partial body
  27. </data1>
  28. <servercmd>
  29. writedelay: 1
  30. </servercmd>
  31. </reply>
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <name>
  38. HTTP with invalid range then another URL
  39. </name>
  40. <command>
  41. -r 10-22 http://%HOSTIP:%HTTPPORT/want/1117 http://%HOSTIP:%HTTPPORT/wantmore/11170001
  42. </command>
  43. </client>
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <stdout>
  47. HTTP/1.1 416 Requested Range Not Satisfiable
  48. Date: Thu, 09 Sep 2010 14:49:00 GMT
  49. Accept-Ranges: bytes
  50. Content-Length: 115
  51. This is a long error message that is large enough that the test server is
  52. guaranteed to split it into two packets.
  53. HTTP/1.1 206 Partial Content
  54. Date: Thu, 09 Sep 2010 14:49:01 GMT
  55. Accept-Ranges: bytes
  56. Content-Range: bytes 10-18/155
  57. Content-Length: 13
  58. Content-Type: text/plain
  59. partial body
  60. </stdout>
  61. <strip>
  62. ^User-Agent:.*
  63. </strip>
  64. <protocol>
  65. GET /want/1117 HTTP/1.1
  66. Range: bytes=10-22
  67. Host: %HOSTIP:%HTTPPORT
  68. Accept: */*
  69. GET /wantmore/11170001 HTTP/1.1
  70. Range: bytes=10-22
  71. Host: %HOSTIP:%HTTPPORT
  72. Accept: */*
  73. </protocol>
  74. </verify>
  75. </testcase>