>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: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3.4
>Environment:
Windows NT 4.0, Both service pack 3 and 4.
>Description:
A CGI script that uses <PRE> 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 '<PRE>', "\n";
for ($i = 1; $i <= 10; $i++)
{
if ($i > 1)
{
sleep (1);
}
print "This is line $i\n";
}
print '</PRE>', "\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 <[EMAIL PROTECTED]> 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! ]