diff options
author | Zeev Suraski <zeev@php.net> | 2002-05-04 23:23:16 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2002-05-04 23:23:16 +0000 |
commit | fe127f93dedafc22549279c6320763cff924e5e3 (patch) | |
tree | 6733a74cdba72fb75dbd1487edb5f8be90b72b46 /main/output.c | |
parent | 707b8b019e3236e8388d1e3b440a28cd22b0c581 (diff) | |
download | php-git-fe127f93dedafc22549279c6320763cff924e5e3.tar.gz |
We shouldn't force Content-length:, but much worse, it's wrong in many
cases (basically, unless you use output buffering to buffer all of your content,
it won't work; output buffering is used for lots of different things as a
functional interface, and such buffers have no relation to Content-type at
all).
Diffstat (limited to 'main/output.c')
-rw-r--r-- | main/output.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/main/output.c b/main/output.c index 24b985ba6c..25f90ec9fd 100644 --- a/main/output.c +++ b/main/output.c @@ -36,19 +36,6 @@ static void php_ob_append(const char *text, uint text_length TSRMLS_DC); static void php_ob_prepend(const char *text, uint text_length); #endif -/* Add Content-Length: HTTP header */ -#include "ext/standard/php_smart_str.h" -#define ADD_CL_HEADER(xln) \ -{ \ - smart_str str = {0}; \ - \ - smart_str_appends(&str, "Content-Length: "); \ - smart_str_append_long(&str, xln); \ - smart_str_0(&str); \ - sapi_add_header(str.c, str.len, 0); \ -} - - #ifdef ZTS int output_globals_id; #else @@ -250,9 +237,6 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS OG(ob_nesting_level)--; if (send_buffer) { - /* FIXME: chunked output behavior is needed to be checked. (Yasuo) */ - if (OG(php_body_write) == php_ub_body_write && OG(ob_nesting_level) == 0 && !OG(active_ob_buffer).erase && status == (PHP_OUTPUT_HANDLER_START|PHP_OUTPUT_HANDLER_END)) - ADD_CL_HEADER(final_buffer_length); OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC); } |