From: Yasuo Ohgaki Date: Thu, 2 May 2002 04:04:59 +0000 (+0000) Subject: Check buffer status X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ee815ec91f42c9aa18e8cdef7c68090394a4dc5;p=php Check buffer status --- diff --git a/main/output.c b/main/output.c index e8ffc9ee54..288b7c0469 100644 --- a/main/output.c +++ b/main/output.c @@ -211,7 +211,8 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS if (SG(headers_sent) && !SG(request_info).headers_only) { OG(php_body_write) = php_ub_body_write_no_header; } else { - if (!OG(active_ob_buffer).erase) /* Set Content-Length only if unerasable */ + /* Set Content-Length only if unerasable */ + if (!OG(active_ob_buffer).erase && status == (PHP_OUTPUT_HANDLER_START|PHP_OUTPUT_HANDLER_END)) ADD_CL_HEADER(OG(active_ob_buffer).text_length); OG(php_body_write) = php_ub_body_write; }