helly Wed Oct 2 11:02:18 2002 EDT
Modified files:
/php4/main output.c
/php4/ext/zlib zlib.c
Log:
Revisted Wez patch: chunk_size 0 means cahce the whole output. So
we must apply the default before calling php_enable_output_compression().
I have left the default setting in the rinit function even though i do think
it is not necessary.
Index: php4/main/output.c
diff -u php4/main/output.c:1.125 php4/main/output.c:1.126
--- php4/main/output.c:1.125 Tue Oct 1 06:01:56 2002
+++ php4/main/output.c Wed Oct 2 11:02:15 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.125 2002/10/01 10:01:56 yohgaki Exp $ */
+/* $Id: output.c,v 1.126 2002/10/02 15:02:15 helly Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -130,10 +130,10 @@
return FAILURE;
}
if (chunk_size) {
+ if (chunk_size==1)
+ chunk_size = 4096;
initial_size = (chunk_size*3/2);
block_size = chunk_size/2;
- if (block_size == 0)
- block_size = 1;
} else {
initial_size = 40*1024;
block_size = 10*1024;
Index: php4/ext/zlib/zlib.c
diff -u php4/ext/zlib/zlib.c:1.150 php4/ext/zlib/zlib.c:1.151
--- php4/ext/zlib/zlib.c:1.150 Mon Sep 30 06:18:06 2002
+++ php4/ext/zlib/zlib.c Wed Oct 2 11:02:16 2002
@@ -18,7 +18,7 @@
| Jade Nicoletti <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.150 2002/09/30 10:18:06 wez Exp $ */
+/* $Id: zlib.c,v 1.151 2002/10/02 15:02:16 helly Exp $ */
#define IS_EXT_MODULE
#ifdef HAVE_CONFIG_H
@@ -230,8 +230,10 @@
ZLIBG(ob_gzhandler_status) = 0;
ZLIBG(ob_gzip_coding) = 0;
if (chunk_size) {
- if (chunk_size == 1)
- chunk_size = 0; /* use the default size */
+ if (chunk_size == 1) {
+ chunk_size = 4096; /* use the default size */
+ ZLIBG(output_compression) = chunk_size;
+ }
php_enable_output_compression(chunk_size TSRMLS_CC);
}
return SUCCESS;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php