cvs: php4 /main main.c output.c
| From: | Yasuo Ohgaki | Date: | Thu, 02 May 2002 01:58:13 +0000 |
| Subject: | cvs: php4 /main main.c output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11602@lists.php.net to get a copy of this message | ||
yohgaki Wed May 1 21:58:13 2002 EDT
Modified files:
/php4/main output.c main.c
Log:
Make Content-Type output always correct.
# Flushing buffer is needed to be fixed properly anyway...
Index: php4/main/output.c
diff -u php4/main/output.c:1.90 php4/main/output.c:1.91
--- php4/main/output.c:1.90 Wed May 1 21:12:01 2002
+++ php4/main/output.c Wed May 1 21:58:12 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.90 2002/05/02 01:12:01 yohgaki Exp $ */
+/* $Id: output.c,v 1.91 2002/05/02 01:58:12 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 {
- ADD_CL_HEADER(OG(active_ob_buffer).text_length);
+ if (!OG(active_ob_buffer).erase) /* Set Content-Length only if unerasable */
+ ADD_CL_HEADER(OG(active_ob_buffer).text_length);
OG(php_body_write) = php_ub_body_write;
}
}
Index: php4/main/main.c
diff -u php4/main/main.c:1.446 php4/main/main.c:1.447
--- php4/main/main.c:1.446 Mon Apr 29 20:17:48 2002
+++ php4/main/main.c Wed May 1 21:58:12 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.446 2002/04/30 00:17:48 wez Exp $ */
+/* $Id: main.c,v 1.447 2002/05/02 01:58:12 yohgaki Exp $ */
/* {{{ includes
*/
@@ -295,7 +295,7 @@
PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL)
STD_PHP_INI_ENTRY("allow_url_fopen", "1", PHP_INI_ALL, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals)
- STD_PHP_INI_ENTRY("always_populate_raw_post_data", "0", PHP_INI_ALL, OnUpdateBool, always_populate_raw_post_data, php_core_globals, core_globals)
+ STD_PHP_INI_ENTRY("always_populate_raw_post_data", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, always_populate_raw_post_data, php_core_globals, core_globals)
PHP_INI_END()
/* }}} */
@@ -739,7 +739,7 @@
}
else if (PG(output_buffering)) {
if (PG(output_buffering)>1) {
- php_start_ob_buffer(NULL, PG(output_buffering), 1 TSRMLS_CC);
+ php_start_ob_buffer(NULL, PG(output_buffering), 0 TSRMLS_CC);
}
else {
php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);