[php-src] Issue #7953: Calling ob_clean() after ob_start('gz_handler') unsets Content-Encoding

From: Date: Mon, 17 Jan 2022 03:54:55 +0000
Subject: [php-src] Issue #7953: Calling ob_clean() after ob_start('gz_handler') unsets Content-Encoding
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-239042@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7953 Author: timint ### Description The following code: ```php <?php ob_start('ob_gzhandler'); ob_clean(); echo 'Hello World'; ``` Resulted in this output: ``` � �H���W�/�IV�J ``` But I expected this output instead: ``` Hello World ``` There is no mention anywhere in the documentation that clearing the output buffer resets the Content-Encoding HTTP Header. If this is by design it should be stated, but it feels like an error. ### PHP Version PHP 8.0.10 ### Operating System Windows 11 x64

« previous php.bugs (#239042) next »