Re: how to flush STDOUT before end of script

Stanley Gambarin (gambarin@OpenMarket.com)
Mon, 03 Feb 1997 11:46:19 -0500

Message-Id: <199702031646.LAA27169@u4-138.openmarket.com>
To: Stanley Gambarin <gambarin@OpenMarket.com>
Subject: Re: how to flush STDOUT before end of script 
In-Reply-To: Your message of "Fri, 31 Jan 1997 13:50:48 EST."
             <199701311850.NAA24725@u4-138.openmarket.com> 
Date: Mon, 03 Feb 1997 11:46:19 -0500
From: Stanley Gambarin <gambarin@OpenMarket.com>

> > 
> > I installed fcgi with apache 1.2b6 with perl ..
> >  but I'am quite dispointed because apache wait for the end of the script
> > execution before sending the whole page. 
> > In this cas I see almost nodifference with a normal cgi script.
> > 
> > How to force apache to print HTML code to the client in "real time" ?
> > 
> 	The fix below will provide you with desired functionality.  It 
> involves a one line fix in DrainReqOutBuf() function. 
> ...
>     if(!reqPtr->connection->aborted) {
>         bwrite(reqPtr->connection->client, begin, count);
> +	bflush(reqPtr->connection->client);
>     }
> 
	Apparently, the above fix works when you application is written in
C, but the problem still remains when the FastCGI program is written in Perl.
(I have not seen problems with other languages).  I have cc'd the message
to the author of the Perl module and hopefully we should see some results.
							Stanley.