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.
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;
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;