Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 29792 invoked by uid 6000); 6 Mar 1999 06:10:10 -0000 Received: (qmail 29392 invoked by uid 2001); 6 Mar 1999 06:10:01 -0000 Received: (qmail 29137 invoked by uid 2012); 6 Mar 1999 06:08:45 -0000 Message-Id: <19990306060845.29136.qmail@hyperreal.org> Date: 6 Mar 1999 06:08:45 -0000 From: Qiang Wan Reply-To: qwan@seatab.com To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: os-windows/4009: CGI script output is always buffered by Apache under Windows Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 4009 >Category: os-windows >Synopsis: CGI script output is always buffered by Apache under Windows >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Mar 5 22:10:01 PST 1999 >Last-Modified: >Originator: qwan@seatab.com >Organization: apache >Release: 1.3.4 >Environment: Windows NT 4.0, Both service pack 3 and 4. >Description: A CGI script that uses
 to speed up response to browser does not work
because Apache seems to buffer the entire output before sending lines to
the browser.
This fails for the Windows version of Apache.  The Linux version does not have
this problem.

Qiang Wan
>How-To-Repeat:
The following CGI script works fine under Linux, where one line is displayed
each second.  It fails under Windows.  Nothing is displayed until the whole
10 seconds elapsed.
------file test.cgi-----------------
#!/perl/bin/perl -I /perl/lib

use CGI;
$cgi = new CGI;
$| = 1;

print $cgi->start_html;
print '
', "\n";
for ($i = 1; $i <= 10; $i++)
{
    if ($i > 1)
    {
       sleep (1);
    }
    print "This is line $i\n";
}
print '
', "\n"; print $cgi->end_html; >Fix: No. >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]