let DEV_2 be trunk
[m6w6/ext-http] / tests / envresponse013.phpt
diff --git a/tests/envresponse013.phpt b/tests/envresponse013.phpt
new file mode 100644 (file)
index 0000000..d21f604
--- /dev/null
@@ -0,0 +1,29 @@
+--TEST--
+env response deflate
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--GET--
+dummy=1
+--FILE--
+<?php
+
+$req = new http\Env\Request;
+$req->setHeader("Accept-Encoding", "deflate");
+
+$res = new http\Env\Response;
+$res->setCacheControl("public, max-age=3600");
+$res->setContentEncoding(http\Env\Response::CONTENT_ENCODING_GZIP);
+$res->getBody()->append("foobar");
+
+$res->setEnvRequest($req);
+$res->send();
+?>
+--EXPECTHEADERS--
+Content-Encoding: deflate
+Vary: Accept-Encoding
+Cache-Control: public, max-age=3600
+--EXPECTREGEX--
+^\x78\x9c.+
+