Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
  Fix GH-8218: ob_end_clean does not reset Content-Encoding header
This commit is contained in:
Christoph M. Becker 2022-04-25 14:28:35 +02:00
commit e063243d2e
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
3 changed files with 10 additions and 2 deletions

8
NEWS
View File

@ -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:

View File

@ -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(), "//");

View File

@ -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)) {