Revert "Imported Upstream version 7.44.0"
[platform/upstream/curl.git] / tests / data / test194
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 Content-Range
7 Resume
8 </keywords>
9 </info>
10
11 # Server-side
12 <reply>
13 <data>
14 HTTP/1.1 416 Requested Range Not Satisfiable swsclose\r
15 Date: Fri, 24 Oct 2003 21:33:12 GMT\r
16 Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
17 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT\r
18 ETag: "ab57a-507-3f9968f3"\r
19 Accept-Ranges: bytes\r
20 Content-Length: 4\r
21 Content-Range: bytes */87\r
22 Content-Type: image/gif\r
23 Connection: close\r
24 \r
25 bad
26 </data>
27
28 <datacheck>
29 HTTP/1.1 416 Requested Range Not Satisfiable swsclose\r
30 Date: Fri, 24 Oct 2003 21:33:12 GMT\r
31 Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1\r
32 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT\r
33 ETag: "ab57a-507-3f9968f3"\r
34 Accept-Ranges: bytes\r
35 Content-Length: 4\r
36 Content-Range: bytes */87\r
37 Content-Type: image/gif\r
38 Connection: close\r
39 </datacheck>
40
41 </reply>
42
43 # Client-side
44 <client>
45 <server>
46 http
47 </server>
48  <name>
49 HTTP resume transfer with the whole file already downloaded and --fail
50  </name>
51  <command>
52 http://%HOSTIP:%HTTPPORT/want/194 -C 87 --fail
53 </command>
54 </client>
55
56 # Verify data after the test has been "shot"
57 <verify>
58 <strip>
59 ^User-Agent:.*
60 </strip>
61 <protocol>
62 GET /want/194 HTTP/1.1\r
63 Range: bytes=87-\r
64 Host: %HOSTIP:%HTTPPORT\r
65 Accept: */*\r
66 \r
67 </protocol>
68 # CURLE_HTTP_RETURNED_ERROR
69 <errorcode>
70 22
71 </errorcode>
72 </verify>
73 </testcase>