cvs: php4 /main output.c
| From: | Yasuo Ohgaki | Date: | Thu, 02 May 2002 04:04:59 +0000 |
| Subject: | cvs: php4 /main output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11604@lists.php.net to get a copy of this message | ||
yohgaki Thu May 2 00:04:59 2002 EDT
Modified files:
/php4/main output.c
Log:
Check buffer status
Index: php4/main/output.c
diff -u php4/main/output.c:1.91 php4/main/output.c:1.92
--- php4/main/output.c:1.91 Wed May 1 21:58:12 2002
+++ php4/main/output.c Thu May 2 00:04:59 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.91 2002/05/02 01:58:12 yohgaki Exp $ */
+/* $Id: output.c,v 1.92 2002/05/02 04:04:59 yohgaki Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -211,7 +211,8 @@
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;
}