From 8be30a65ae8d279e40c3b2f2767c403a3b10d323 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 23 Sep 2020 23:52:27 +0200 Subject: [PATCH] Fix #78792: zlib.output_compression disabled by Content-Type: image/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disabling output compression for images has served to fix bug #16109, where zlib compressed images apparently have caused issues with Navigator 4. This shouldn't be an issue with somewhat contemporary browsers. Other than that, this is an arbitrary restriction – why don't we disable the compression for some other media types as well (e.g. video/* and audio/*)? All in all, we should leave that decision to userland. --- main/SAPI.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/main/SAPI.c b/main/SAPI.c index 01ec31f72218f..0a7f219e847e5 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -762,13 +762,6 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg) len--; } - /* Disable possible output compression for images */ - if (!strncmp(ptr, "image/", sizeof("image/")-1)) { - zend_string *key = zend_string_init("zlib.output_compression", sizeof("zlib.output_compression")-1, 0); - zend_alter_ini_entry_chars(key, "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); - zend_string_release_ex(key, 0); - } - mimetype = estrdup(ptr); newlen = sapi_apply_default_charset(&mimetype, len); if (!SG(sapi_headers).mimetype){