]> granicus.if.org Git - php/commitdiff
Fix implicit_flush
authorMarcus Boerger <helly@php.net>
Wed, 2 Oct 2002 15:36:29 +0000 (15:36 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 2 Oct 2002 15:36:29 +0000 (15:36 +0000)
NEWS
main/output.c

diff --git a/NEWS b/NEWS
index b829467a8838f93b3c332f3e08ebe4e7f4a75cad..f6fb4aba08da02b905092bad0d3c893a78e0882b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index 9fdffdc9945a434dd577061e76febcdbaee7a5f1..35e8988a3342c98c782e01115f57426a0d668ae9 100644 (file)
@@ -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) {