httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Smithfeld" <>
Subject [users@httpd] "server push" (unbuffered) cgi not working in apache2?
Date Sat, 01 Dec 2007 19:15:02 GMT
Hi. I am trying to write a (somewhat) long-running cgi script that
will display its
output as it processes.
Right now, my browser is waiting until receiving all the output (until
the script
terminates or closes stdout) before displaying anything.

Based on what I have read,  content should be pushed to the client
whenever my script flushes stdout. For example this is what is claimed

I am using apache 2.2.4 on x64 Ubuntu.

Here is an example script in perl:
$| = 1;

print "Content-type: text/plain\n\n";

for ($i = 1; $i < 5; $i++)
        print "$i\n";

And in python:
import time
import sys

print "Content-type: text/plain\n"

for i in xrange(4):
    print i

In both cases, the client waits for script to finish before displaying
anything. Why?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message