cvs: php4 /main output.c

From: Date: Sat, 04 May 2002 23:23:16 +0000
Subject: cvs: php4 /main output.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11698@lists.php.net to get a copy of this message
zeev Sat May 4 19:23:16 2002 EDT Modified files: /php4/main output.c Log: 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). Index: php4/main/output.c diff -u php4/main/output.c:1.100 php4/main/output.c:1.101 --- php4/main/output.c:1.100 Sat May 4 15:06:46 2002 +++ php4/main/output.c Sat May 4 19:23:16 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.100 2002/05/04 19:06:46 sas Exp $ */ +/* $Id: output.c,v 1.101 2002/05/04 23:23:16 zeev Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -36,19 +36,6 @@ 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 @@ 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); }

« previous php.cvs (#11698) next »