]> granicus.if.org Git - php/commitdiff
Make Content-Type output always correct.
authorYasuo Ohgaki <yohgaki@php.net>
Thu, 2 May 2002 01:58:12 +0000 (01:58 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Thu, 2 May 2002 01:58:12 +0000 (01:58 +0000)
# Flushing buffer is needed to be fixed properly anyway...

main/main.c
main/output.c

index 737507ac1d0ea54e61bd422ef7b4e7364c5c2493..fcd73d82392d526f92fdd29519aff0a9ef621701 100644 (file)
@@ -295,7 +295,7 @@ PHP_INI_BEGIN()
        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 @@ int php_request_startup(TSRMLS_D)
                }
                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);
index 5b41bd8bdfc719f6c9d1df0c488c6d1cfca050e9..e8ffc9ee546327e8a413006bdc81ce14e3b45eba 100644 (file)
@@ -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 {
-                       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;
                }
        }