X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fenvresponse010.phpt;fp=tests%2Fenvresponse010.phpt;h=d365497e4aa334b6e0e4520f21c47f214c77bfd4;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=0000000000000000000000000000000000000000;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/envresponse010.phpt b/tests/envresponse010.phpt new file mode 100644 index 0000000..d365497 --- /dev/null +++ b/tests/envresponse010.phpt @@ -0,0 +1,29 @@ +--TEST-- +env response stream ranges +--SKIPIF-- + +--ENV-- +HTTP_RANGE=bytes=2-4 +--GET-- +a=b +--FILE-- +setContentType("text/plain"); +$r->setContentDisposition( + array("attachment" => array(array("filename" => basename(__FILE__)))) +); +$r->setBody(new http\Message\Body(fopen(__FILE__, "rb"))); +$r->send($f); +rewind($f); +var_dump(stream_get_contents($f)); +?> +--EXPECTF-- +string(%i) "HTTP/1.1 206 Partial Content%c +Accept-Ranges: bytes%c +X-Powered-By: PHP/%s%c +Content-Type: text/plain%c +Content-Range: bytes 2-4/311%c +%c +php"