diff options
author | Marcus Boerger <helly@php.net> | 2002-10-02 15:36:29 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-10-02 15:36:29 +0000 |
commit | 1e6557f6644e8fe40e712d519f7cd9595119a073 (patch) | |
tree | 457d7463a841e147bbe23d6552164aef08a219e2 | |
parent | ff51ed7c6f3a9853d719cad22df67660c7af09a0 (diff) | |
download | php-git-1e6557f6644e8fe40e712d519f7cd9595119a073.tar.gz |
Fix implicit_flush
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/output.c | 12 |
2 files changed, 6 insertions, 8 deletions
@@ -5,7 +5,7 @@ PHP 4 NEWS {PREFIX}/bin/php. If you don't disable the CGI binary, it will be installed as {PREFIX}/bin/php-cgi. - Fixed bug #17825 (ob_start() chunk size option didn't work well). (Yasuo) -- Fixed output buffering implicit flush. (Yasuo) +- Fixed output buffering implicit flush. (Yasuo, Marcus) - Added getopt() for parsing command line options and arguments. (Jon) - Added pg_fetch_assoc(), pg_fetch_all(), pg_ping(), pg_meta_data(), pg_convert(), pg_insert(), pg_select(), pg_update(), pg_delete(), pg_data_seek() and diff --git a/main/output.c b/main/output.c index 9fdffdc994..35e8988a33 100644 --- a/main/output.c +++ b/main/output.c @@ -595,13 +595,11 @@ static void php_ob_append(const char *text, uint text_length TSRMLS_DC) /* If implicit_flush is On, send contents to next buffer and return. Both PG() and OG() should be used since we should flush implicitly always when implicit_flush is enabled in php.ini */ - if (PG(implicit_flush) || OG(implicit_flush)) { - php_end_ob_buffer(1, 1 TSRMLS_CC); - return; - } - - if (OG(active_ob_buffer).chunk_size - && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) { + if (PG(implicit_flush) || OG(implicit_flush) + /* Also flush after each chunk if output is chunked */ + || (OG(active_ob_buffer).chunk_size + && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) + ) { zval *output_handler = OG(active_ob_buffer).output_handler; if (output_handler) { |