|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-09-19 14:44 UTC] mike@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: mike
[2013-07-30 19:49 UTC] mike@php.net
-Status: Verified
+Status: Wont fix
-Package: Output Control
+Package: Zlib related
[2013-07-30 19:49 UTC] mike@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 17:00:01 2025 UTC |
Description: ------------ ob_start(ob_gzhandler) can be used to send optionally compressed-output to clients. But the test made to check whether the client supports gzip/deflate encoding only looks at the appearance of the string "gzip" (resp. "deflate") in the Accept-Encoding header, but doesn't actually parse the said header. This means that the following Accept-Encoding headers will trigger generation of gzip-compressed output when they should not: * using a string with gzip in it Accept-Encoding: foogzip25 * using quality parameters as made possible in HTTP Accept-Encoding: gzip;q=0, identity;q=1 Test script: --------------- <?php if (!ob_start("ob_gzhandler")) { ob_start(); echo "Uncompressed"; } else { echo "Compressed"; } ob_end_flush(); ?> Expected result: ---------------- The script below can be used to test with the accept-encoding reported above; the said accept-encoding should report "Uncompressed" but reports "Compressed" (gzipped).