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