Skip to content

Commit e063243

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix GH-8218: ob_end_clean does not reset Content-Encoding header
2 parents 948ef10 + 30f4c72 commit e063243

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

NEWS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ PHP NEWS
3030
- Hash:
3131
. Fixed bug #81714 (segfault when serializing finalized HashContext). (cmb)
3232

33+
- Iconv:
34+
. Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).
35+
(cmb)
36+
3337
- Intl:
3438
. Fixed bug GH-8364 (msgfmt_format $values may not support references). (cmb)
3539

@@ -50,6 +54,10 @@ PHP NEWS
5054
. Fixed php://temp does not preserve file-position when switched to temporary
5155
file. (Bernd Holzmüller)
5256

57+
- zlib:
58+
. Fixed bug GH-8218 (ob_end_clean does not reset Content-Encoding header).
59+
(cmb)
60+
5361
14 Apr 2022, PHP 8.1.5
5462

5563
- Core:

ext/iconv/iconv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c
311311
mimetype = SG(default_mimetype) ? SG(default_mimetype) : SAPI_DEFAULT_MIMETYPE;
312312
}
313313

314-
if (mimetype != NULL && (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || (output_context->op & PHP_OUTPUT_HANDLER_START))) {
314+
if (mimetype != NULL && (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || ((output_context->op & PHP_OUTPUT_HANDLER_START) && !(output_context->op & PHP_OUTPUT_HANDLER_FINAL)))) {
315315
size_t len;
316316
char *p = strstr(get_output_encoding(), "//");
317317

ext/zlib/zlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static int php_zlib_output_handler(void **handler_context, php_output_context *o
281281
return FAILURE;
282282
}
283283

284-
if (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || (output_context->op & PHP_OUTPUT_HANDLER_START)) {
284+
if (!(output_context->op & PHP_OUTPUT_HANDLER_CLEAN) || ((output_context->op & PHP_OUTPUT_HANDLER_START) && !(output_context->op & PHP_OUTPUT_HANDLER_FINAL))) {
285285
int flags;
286286

287287
if (SUCCESS == php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS, &flags)) {

0 commit comments

Comments
 (0)