cvs: php4 /ext/zlib zlib.c

From: Date: Sun, 11 Aug 2002 01:11:12 +0000
Subject: cvs: php4 /ext/zlib zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13253@lists.php.net to get a copy of this message
yohgaki Sat Aug 10 21:11:12 2002 EDT Modified files: /php4/ext/zlib zlib.c Log: Generally speaking, sending packets less than 1KB is not efficient. We're better to take some benchmarks see if removing extra buffer is actually a good idea or not. Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.141 php4/ext/zlib/zlib.c:1.142 --- php4/ext/zlib/zlib.c:1.141 Sat Aug 10 12:12:36 2002 +++ php4/ext/zlib/zlib.c Sat Aug 10 21:11:11 2002 @@ -18,7 +18,7 @@ | Jade Nicoletti <nicoletti@nns.ch> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.141 2002/08/10 16:12:36 helly Exp $ */ +/* $Id: zlib.c,v 1.142 2002/08/11 01:11:11 yohgaki Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -1013,7 +1013,9 @@ return FAILURE; } - php_ob_set_internal_handler(php_gzip_output_handler, buffer_size*3/2, "zlib output compression", 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*3/2), "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); }

« previous php.cvs (#13253) next »