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