Re: Possible bug when wrapping CGI/FastCGI generated pages

Con Tassios <[email protected]> Tue, 8 Jan 2008 13:11:24 +1100 (EST)
Newsgroups gmane.comp.apache.mod-layout
Message-ID <[email protected]>
On Mon, 7 Jan 2008, Brian Aker wrote:

> So basically if FastCGI can't buffer the entire contents in one pass,
> mod_layout applies the headers in multiple?

Hi Brian,

Yes, that is correct.


> Does it ever triple?


Yes.  If the PHP generated page is say 220KB in size and the CGI output buffer
is 64KB, the page served to the client will consist of 4 chunks of
approximately the buffer size * N

N
1  64KB
2  128KB
3  192KB
4  220KB

Total size of served page = 604KB

Each of these 4 chunks has the header and footer attached.  Each subsequent
chunk is the same as the previous plus the next 64KB of the original file.  The
last chunk is the complete file with the header and footer attached.