diff --git a/NEWS b/NEWS index c2dec7e18b2..fe5e02f02a6 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,10 @@ PHP NEWS - Hash: . Fixed bug #81714 (segfault when serializing finalized HashContext). (cmb) +- Iconv: + . Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header). + (cmb) + - Intl: . Fixed bug GH-8364 (msgfmt_format $values may not support references). (cmb) @@ -50,6 +54,10 @@ PHP NEWS . Fixed php://temp does not preserve file-position when switched to temporary file. (Bernd Holzmüller) +- zlib: + . Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header). + (cmb) + 14 Apr 2022, PHP 8.1.5 - Core: diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 39de76a5e42..f05e58aa1d9 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -311,7 +311,7 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c mimetype = SG(default_mimetype) ? SG(default_mimetype) : SAPI_DEFAULT_MIMETYPE; } - if (mimetype != NULL && (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || (output_context->op & PHP_OUTPUT_HANDLER_START))) { + if (mimetype != NULL && (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || ((output_context->op & PHP_OUTPUT_HANDLER_START) && !(output_context->op & PHP_OUTPUT_HANDLER_FINAL)))) { size_t len; char *p = strstr(get_output_encoding(), "//"); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 09188dc7694..a53fb2acc45 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -281,7 +281,7 @@ static int php_zlib_output_handler(void **handler_context, php_output_context *o return FAILURE; } - if (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || (output_context->op & PHP_OUTPUT_HANDLER_START)) { + if (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || ((output_context->op & PHP_OUTPUT_HANDLER_START) && !(output_context->op & PHP_OUTPUT_HANDLER_FINAL))) { int flags; if (SUCCESS == php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS, &flags)) {