summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-05-02 04:04:59 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-05-02 04:04:59 +0000
commit8ee815ec91f42c9aa18e8cdef7c68090394a4dc5 (patch)
tree16d9c293a27208a787d19e0039e713f767851d86
parentf61b795a8f85149b43de471dbd4205689b29e938 (diff)
downloadphp-git-8ee815ec91f42c9aa18e8cdef7c68090394a4dc5.tar.gz
Check buffer status
-rw-r--r--main/output.c3
1 files changed, 2 insertions, 1 deletions
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;
}