X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fenvresponse007.phpt;fp=tests%2Fenvresponse007.phpt;h=5495fe2ba2708a0ee1d24b78a3dea093f8001455;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=0000000000000000000000000000000000000000;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/envresponse007.phpt b/tests/envresponse007.phpt new file mode 100644 index 0000000..5495fe2 --- /dev/null +++ b/tests/envresponse007.phpt @@ -0,0 +1,39 @@ +--TEST-- +env response env request +--SKIPIF-- + +--GET-- +dummy=1 +--FILE-- +setHeader("Range", "bytes=2-4"); + +$res = new http\Env\Response; +$res->setEnvRequest($req); +$res->setContentType("text/plain"); +$res->getBody()->append("012345679"); +$res->send($tmp); + +rewind($tmp); +var_dump(stream_get_contents($tmp)); + +?> +Done +--EXPECTF-- +Test +string(%d) "HTTP/1.1 206 Partial Content%c +Accept-Ranges: bytes%c +X-Powered-By: %s%c +Content-Type: text/plain%c +Content-Range: bytes 2-4/9%c +%c +234" +Done