[wp-trac] [WordPress Trac] #11588: show_message() should flush the output buffers when its called.
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 24 12:23:55 UTC 2009
#11588: show_message() should flush the output buffers when its called.
----------------------------+-----------------------------------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Administration | Version: 2.9
Severity: normal | Keywords: has-patch
----------------------------+-----------------------------------------------
Comment(by Denis-de-Bernardy):
FWIW, the suggested patch doesn't flush hard enough.
I use this function, personally:
{{{
function force_flush() {
echo "\n\n<!-- Deal with browser-related buffering by
sending some incompressible strings -->\n\n";
for ( $i = 0; $i < 5; $i++ )
echo "<!--
abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono
-->\n\n";
while ( ob_get_level() )
ob_end_flush();
@ob_flush();
@flush();
@set_time_limit(FS_TIMEOUT);
} # force_flush()
}}}
and before it, at the very beginning of the various upgrader scripts:
{{{
if ( function_exists('apache_setenv') )
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
}}}
anything short of that will reveal that the flushing does not occur on
some servers and some user agents.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11588#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list