test1117 1.6 KB

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