diff options
author | Jani Taskinen <jani@php.net> | 2009-08-17 16:54:39 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2009-08-17 16:54:39 +0000 |
commit | 46bd9ed59712e5505e0193fff2246ec8a452c89e (patch) | |
tree | 2542514a3a88c6545c60df371c7a59ab0ee43f78 /main/SAPI.c | |
parent | 229212c5ca54e3a403f559c3c14f050231d2ae33 (diff) | |
download | php-git-46bd9ed59712e5505e0193fff2246ec8a452c89e.tar.gz |
- Try disabling zlib.output_compression always for images. (zlib extension might be compiled as shared and not same time as the main PHP binary)
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 25bb28f5d2..97268253c7 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -637,11 +637,12 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) ptr++; len--; } -#if HAVE_ZLIB - if(!strncmp(ptr, "image/", sizeof("image/")-1)) { + + /* Disable possible output compression for images */ + if (!strncmp(ptr, "image/", sizeof("image/")-1)) { zend_alter_ini_entry("zlib.output_compression", sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); } -#endif + mimetype = estrdup(ptr); newlen = sapi_apply_default_charset(&mimetype, len TSRMLS_CC); if (!SG(sapi_headers).mimetype){ |