From 329c2581485da7c165f5b495972da55c22db6bb9 Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Mon, 3 Aug 2009 18:15:30 +0000 Subject: [PATCH] - Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when set to a string value) # also fixes bug #35936 (ini.zlib.output-compression Documentation :) --- NEWS | 2 ++ ext/zlib/php_zlib.h | 2 ++ main/SAPI.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c80b7a4071..6f23918fc9 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ PHP NEWS (Jani) - Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars restrictions). (Ilia) +- Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when + set to a string value). (Jani) - Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe) - Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia) diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 1a2d3a4bf3..a7ef59a9de 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -35,6 +35,8 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib) char *output_handler; ZEND_END_MODULE_GLOBALS(zlib) +PHPAPI ZEND_EXTERN_MODULE_GLOBALS(zlib) + extern php_stream_filter_factory php_zlib_filter_factory; extern zend_module_entry php_zlib_module_entry; #define zlib_module_ptr &php_zlib_module_entry diff --git a/main/SAPI.c b/main/SAPI.c index 3205e4cb6a..5c022d0aaf 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -768,7 +768,7 @@ SAPI_API int sapi_send_headers(TSRMLS_D) /* Add output compression headers at this late stage in order to make it possible to switch it off inside the script. */ - if (zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0)) { + if (ZLIBG(output_compression)) { zval nm_zlib_get_coding_type; zval *uf_result = NULL; -- 2.50.1