summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-08-10 12:58:46 +0000
committerMarcus Boerger <helly@php.net>2002-08-10 12:58:46 +0000
commitff63bf2a4f698c424cf9b8cd6aa900f35a13a2e8 (patch)
treefc1d112ae75795c935d0c9e80558b6c02d1f842c /ext/zlib
parent289607970cdab826ee468a5ab9ff5298ebf2501c (diff)
downloadphp-git-ff63bf2a4f698c424cf9b8cd6aa900f35a13a2e8.tar.gz
no need to start additional first buffer when output compression is first buffer
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index fbb2554ddc..a4653d62fd 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1013,7 +1013,8 @@ int php_enable_output_compression(int buffer_size TSRMLS_DC)
return FAILURE;
}
- php_start_ob_buffer(NULL, buffer_size, 0 TSRMLS_CC);
+ if (OG(ob_nesting_level)==0)
+ php_start_ob_buffer(NULL, buffer_size, 0 TSRMLS_CC);
php_ob_set_internal_handler(php_gzip_output_handler, (uint)(buffer_size*1.5f), "zlib output compression", 0 TSRMLS_CC);
if (ZLIBG(output_handler) && strlen(ZLIBG(output_handler))) {
php_start_ob_buffer_named(ZLIBG(output_handler), 0, 1 TSRMLS_CC);