X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fenvresponse001.phpt;fp=tests%2Fenvresponse001.phpt;h=9d55a5b69ead9a8118bb96d03cf30abf3ff9de52;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=0000000000000000000000000000000000000000;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/envresponse001.phpt b/tests/envresponse001.phpt new file mode 100644 index 0000000..9d55a5b --- /dev/null +++ b/tests/envresponse001.phpt @@ -0,0 +1,23 @@ +--TEST-- +env response message +--SKIPIF-- + +--POST-- +a=b +--ENV-- +HTTP_ACCEPT_ENCODING=gzip +--FILE-- +setHeader("foo","bar"); +$r->setContentEncoding(http\env\Response::CONTENT_ENCODING_GZIP); +$r->setBody(new http\message\Body(fopen(__FILE__,"r"))); +$r->send(); + +--EXPECTHEADERS-- +Foo: bar +Content-Encoding: gzip +Vary: Accept-Encoding +--EXPECTREGEX-- +^\x1f\x8b\x08.+