test1117 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: Tue, 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: Tue, 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/%TESTNUMBER http://%HOSTIP:%HTTPPORT/wantmore/%TESTNUMBER0001
  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: Tue, 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: Tue, 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. <protocol>
  62. GET /want/%TESTNUMBER HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. Range: bytes=10-22
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. GET /wantmore/%TESTNUMBER0001 HTTP/1.1
  68. Host: %HOSTIP:%HTTPPORT
  69. Range: bytes=10-22
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. </protocol>
  73. </verify>
  74. </testcase>