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