use new propro version for travis
[m6w6/ext-http] / tests / envresponse010.phpt
1 --TEST--
2 env response stream ranges
3 --SKIPIF--
4 <?php include "skipif.inc"; ?>
5 --ENV--
6 HTTP_RANGE=bytes=2-4
7 --GET--
8 a=b
9 --FILE--
10 <?php
11 $f = tmpfile();
12 $r = new http\Env\Response;
13 $r->setContentType("text/plain");
14 $r->setContentDisposition(
15 array("attachment" => array(array("filename" => basename(__FILE__))))
16 );
17 $r->setBody(new http\Message\Body(fopen(__FILE__, "rb")));
18 $r->send($f);
19 rewind($f);
20 var_dump(stream_get_contents($f));
21 ?>
22 --EXPECTF--
23 string(%i) "HTTP/1.1 206 Partial Content%c
24 Accept-Ranges: bytes%c
25 X-Powered-By: PHP/%s%c
26 Content-Type: text/plain%c
27 Content-Range: bytes 2-4/311%c
28 Transfer-Encoding: chunked%c
29 %c
30 3%c
31 php%c
32 0%c
33 %c
34 "