[php-src] Issue #8218: ob_end_clean does not reset Content-Encoding header
| From: | kamil-tekiela | Date: | Thu, 24 Mar 2022 10:28:33 +0000 |
| Subject: | [php-src] Issue #8218: ob_end_clean does not reset Content-Encoding header | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240475@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8218
Comment Author: kamil-tekiela
Correct,
ob_end_clean() shouldn't remove the headers, but my point is that it also
shouldn't add them. The headers should only be added when there is any output during output
buffering, such as ob_flush. If there is no output, and we end clean then there's
no need to add the headers.