httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <ras...@lerdorf.on.ca>
Subject ap_rflush() ?
Date Mon, 27 Jul 1998 21:18:23 GMT
Once upon a time, not sure how many hundreds of versions ago, rflush()
worked ok and I could write a little PHP script that looked like this:

    for($i=0;$i<100;$i++) {
        echo ".";
        flush();
        sleep(1);
    }

It would work as expected sending a '.' every second.  With Apache-1.3
this is no longer the case.  I realize that defeating Apache's buffering
makes a mess of chunking and fragments the TCP packets and probably does
another 50 bad things, but still, what's the point of ap_rflush() if it
doesn't flush?  Is there some other way to force such a flush now? 

This goes back to my trouble with detecting someone hitting the STOP
button.  At various critical points in a complex script I would like to be
able to do a flush() so I can detect whether the client has gone away
before heading into the next resource-intensive (generally complex SQL
queries) part of the application.

-Rasmus


Mime
View raw message