Stas Bekman wrote:
Philip M. Gollucci wrote:
[...]

6. Okay so from the 4 above attached files in #5 it looks like PerlIOApache_flush() is being called, but not working.
    [I'll list this function at the end of the e-mail.]
    Basically, I think there is a SNAFU here

MP_RUN_CROAK(modperl_wbucket_flush(rcfg->wbucket, FALSE), ":Apache2 IO flush");

That FALSE ends up being add_flush_bucket so even though we call flush we never get a flush bucket!!!!!!


I think your observation and the fix are correct Philip. But before we commit any fix we need to have a test that breaks and the fix fixes it.

As I think more about it, there was a reason for this FALSE setting. As you know Apache will send headers as soon as it gets some data out and a flush bucket is by Apache-talk is data. So what was happening is that when users were doing something in their code that was causing perl to flush STDOUT behind the scenes (like a filehandle dup), Apache will go and generate the headers even if the user haven't had a chance to set those. That's why it was written in such a way: i.e. add a flush bucket only if there is some data to flush, otherwise you need to call $r->flush if you want the flush to be sent anyway.

I think we may even have a test for that case (grep for $| I guess)

--
_______________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED]   | http://stason.org/
MailChannels: Assured Messaging (TM) | http://mailchannels.com/
The "Practical mod_perl" book        | http://modperlbook.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to