Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ brotli.output\_compression\_dict | "" | PHP\_INI\_ALL

* brotli.output\_compression\_exclude\_types _string_

Extension contains a built-in list of non-compressible MIME types.
The list can be found from phpinfo() output. If something is
missing, more MIME types can be added with this ini setting.
The extension contains a built-in list of non-compressible MIME
types. The list can be found in the phpinfo() output. If
something is missing, more MIME types can be added with this
ini setting.

Comma-separated list of MIME types that should not be
compressed by the transparent output handler.
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
<file name="tests/ob_exclude_001.phpt" role="test" />
<file name="tests/ob_exclude_002.phpt" role="test" />
<file name="tests/ob_exclude_003.phpt" role="test" />
<file name="tests/ob_exclude_004.phpt" role="test" />
<file name="tests/ob_exclude_099.phpt" role="test" />
<file name="tests/roundtrip.phpt" role="test" />
<file name="tests/streams_001.phpt" role="test" />
Expand Down
2 changes: 1 addition & 1 deletion tests/ob_exclude_001.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
brotli.output_compression_exclude_types exact match
built-in output compression exclude list: exact match (no ini set)
--SKIPIF--
<?php
if (!extension_loaded('brotli')) die('skip need ext/brotli');
Expand Down
20 changes: 20 additions & 0 deletions tests/ob_exclude_004.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
built-in output compression exclude list: wildcard match (no ini set)
--SKIPIF--
<?php
if (!extension_loaded('brotli')) die('skip need ext/brotli');
if (false === stristr(PHP_SAPI, 'cgi')) die('skip need sapi/cgi');
?>
--GET--
a=b
--INI--
brotli.output_compression=1
--ENV--
HTTP_ACCEPT_ENCODING=br
--FILE--
<?php
header("Content-Type: audio/mpeg");
echo "hi\n";
?>
--EXPECT--
hi
Loading