File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,8 @@ static void php_zlib_output_compression_start(TSRMLS_D)
284
284
ZLIBG (output_compression ) = PHP_OUTPUT_HANDLER_DEFAULT_SIZE ;
285
285
/* break omitted intentionally */
286
286
default :
287
- if ( (h = php_zlib_output_handler_init (ZEND_STRL (PHP_ZLIB_OUTPUT_HANDLER_NAME ), ZLIBG (output_compression ), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC )) &&
287
+ if ( php_zlib_output_encoding (TSRMLS_C ) &&
288
+ (h = php_zlib_output_handler_init (ZEND_STRL (PHP_ZLIB_OUTPUT_HANDLER_NAME ), ZLIBG (output_compression ), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC )) &&
288
289
(SUCCESS == php_output_handler_start (h TSRMLS_CC ))) {
289
290
if (ZLIBG (output_handler ) && * ZLIBG (output_handler )) {
290
291
MAKE_STD_ZVAL (zoh );
@@ -966,7 +967,6 @@ static PHP_RINIT_FUNCTION(zlib)
966
967
967
968
static PHP_RSHUTDOWN_FUNCTION (zlib )
968
969
{
969
- ZLIBG (output_compression ) = 0 ;
970
970
php_zlib_cleanup_ob_gzhandler_mess (TSRMLS_C );
971
971
972
972
return SUCCESS ;
Original file line number Diff line number Diff line change @@ -1025,6 +1025,7 @@ static inline php_output_handler_status_t php_output_handler_op(php_output_handl
1025
1025
case PHP_OUTPUT_HANDLER_SUCCESS :
1026
1026
/* no more buffered data */
1027
1027
handler -> buffer .used = 0 ;
1028
+ handler -> flags |= PHP_OUTPUT_HANDLER_PROCESSED ;
1028
1029
break ;
1029
1030
}
1030
1031
Original file line number Diff line number Diff line change 45
45
/* handler status flags */
46
46
#define PHP_OUTPUT_HANDLER_STARTED 0x1000
47
47
#define PHP_OUTPUT_HANDLER_DISABLED 0x2000
48
+ #define PHP_OUTPUT_HANDLER_PROCESSED 0x4000
48
49
49
50
/* handler op return values */
50
51
typedef enum _php_output_handler_status_t {
@@ -82,7 +83,7 @@ typedef enum _php_output_handler_hook_t {
82
83
} php_output_handler_hook_t ;
83
84
84
85
#define PHP_OUTPUT_HANDLER_INITBUF_SIZE (s ) \
85
- ( (s ) ? \
86
+ ( ((s) > 1 ) ? \
86
87
(s) + PHP_OUTPUT_HANDLER_ALIGNTO_SIZE - ((s) % (PHP_OUTPUT_HANDLER_ALIGNTO_SIZE)) : \
87
88
PHP_OUTPUT_HANDLER_DEFAULT_SIZE \
88
89
)
You can’t perform that action at this time.
0 commit comments