8511fff1ea12a6e28d5e7b96c4764217da9113c9
[m6w6/ext-http] / tests / envresponseranges001.phpt
1 --TEST--
2 ranges
3 --SKIPIF--
4 <? include "skipif.php";
5 --GET--
6 a=b
7 --ENV--
8 HTTP_RANGE=bytes=-3,000-001,1-1,0-0,100-
9 --FILE--
10 <?php
11
12 $r = new http\Env\Response;
13 $r->setBody(new http\Message\Body(fopen(__FILE__, "rb")));
14 $r->send();
15
16 ?>
17 --EXPECTF--
18 --%s%c
19 Content-Type: application/octet-stream%c
20 Content-Range: bytes 107-109/110%c
21 %c
22 ?>
23 %c
24 --%s%c
25 Content-Type: application/octet-stream%c
26 Content-Range: bytes 0-1/110%c
27 %c
28 <?%c
29 --%s%c
30 Content-Type: application/octet-stream%c
31 Content-Range: bytes 1-1/110%c
32 %c
33 ?%c
34 --%s%c
35 Content-Type: application/octet-stream%c
36 Content-Range: bytes 0-0/110%c
37 %c
38 <%c
39 --%s%c
40 Content-Type: application/octet-stream%c
41 Content-Range: bytes 100-109/110%c
42 %c
43 nd();
44
45 ?>
46 %c
47 --%s--