summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/ob_003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/tests/ob_003.phpt')
-rw-r--r--ext/zlib/tests/ob_003.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/zlib/tests/ob_003.phpt b/ext/zlib/tests/ob_003.phpt
new file mode 100644
index 0000000..43dbb08
--- /dev/null
+++ b/ext/zlib/tests/ob_003.phpt
@@ -0,0 +1,25 @@
+--TEST--
+zlib.output_compression
+--SKIPIF--
+<?php
+if (!extension_loaded("zlib")) die("skip need ext/zlib");
+if (false === stristr(PHP_SAPI, "cgi")) die("skip need sapi/cgi");
+?>
+--INI--
+zlib.output_compression=0
+--ENV--
+HTTP_ACCEPT_ENCODING=gzip
+--POST--
+dummy=42
+--FILE--
+<?php
+ini_set("zlib.output_compression", 1);
+echo "hi\n";
+?>
+--EXPECTF--
+%s
+Content-Encoding: gzip
+Vary: Accept-Encoding
+%s
+
+%s