php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68778 zlib.output_compression does not parse Accept-Encoding correct
Submitted: 2015-01-09 14:07 UTC Modified: 2020-09-22 14:58 UTC
From: ingo dot flaschberger at openresearch dot com Assigned:
Status: Verified Package: Zlib related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ingo dot flaschberger at openresearch dot com
New email:
PHP Version: OS:

 

 [2015-01-09 14:07 UTC] ingo dot flaschberger at openresearch dot com
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();



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-22 14:58 UTC] cmb@php.net
-Status: Open +Status: Verified
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 08:01:28 2024 UTC