|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-09-22 14:58 UTC] cmb@php.net
-Status: Open
+Status: Verified
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ In ext/zlib/zlib.c:static PHP_FUNCTION(ob_gzhandler) the HTTP_ACCEPT_ENCODING is not parsed. PHP only checks, if the string "gzip" oder "deflate" is inside the header and enables outputcompression if set. RFC2616 allows for example that a probability (q) is set, which could be also 0 (disable compression) but PHP will enable it. For example: Accept-Encoding: gzip;q=0.0 actual result: compressed output expected result: uncompressed output Accept-Encoding: thisisnotavalidgzipacceptencoding actual result: compressed output expected result: uncompressed output Test script: --------------- <?php ini_set("zlib.output_compression", "1"); ob_start(); echo "foo"; ob_get_clean();