This is odd, your code should have been working, wsapi.common already calls :flush after every :write, if a flush method is available, and the FastCGI output object has a flush method (Xavante's does not, but it uses a naked socket, which should be unbuffered anyway). But you may need to change the configuration of your webserver, check this thread:
http://lists.luaforge.net/pipermail/kepler-project/2010-August/004289.html -- Fabio Mascarenhas On Thu, Jan 13, 2011 at 1:14 PM, Norman Clarke <[email protected]> wrote: > Hello Keplerites, > > I'm having a bit of a difficult time figuring out how to stream > content with WSAPI. I've got this simple CGI which outputs a counter, > and I'd like to see the progress, but when I run it it just waits > until the script completes to flush output to the browser. > > https://gist.github.com/777993 > > FYI I'm serving it with Lighttpd, but that likely doesn't matter - the > results are the same with Xavante. I think I'm missing something very > obvious, either practically or conceptually. Can somebody please let > me know just how dumb I am being? > > Regards, > > Norman > > _______________________________________________ > Kepler-Project mailing list > [email protected] > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ > _______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
