re: fastcgi and ssi

Mark Brown (mbrown@openmarket.com)
Wed, 09 Oct 1996 18:52:00 -0400

Message-Id: <199610092252.SAA04072@breckenridge.openmarket.com>
To: fastcgi-developers@openmarket.com
Subject: re: fastcgi and ssi
In-Reply-To: <Pine.LNX.3.91.961009123053.25910A-100000@piglet.pooh-corner.com>
Date: Wed, 09 Oct 1996 18:52:00 -0400
From: Mark Brown <mbrown@openmarket.com>


James M. Golovich asks:

    I guess I didn't make my question clear.  Or actually I don't
    think I even really asked a question.  But The BeginHeader
    function is what is printing the headers, and I was wondering if
    it would break anything if I hacked it so these headers werent
    being printed..

In the case of a normal FastCGI request, mod_fastcgi parses the headers
produced by the FastCGI application, removes some of them, and
generates appropriate HTTP headers to send back to the client.

This means that if you hack mod_fastcgi to suppress the HTTP headers, your
applications will not be able to respond to HTTP requests.

The way SSI's "include virtual" is supposed to work is that the server
runs a sub-request just as if it had come via the network, and
includes the *body* of the response in the SSI result.  Thus the
server is responsible for filtering out the HTTP headers from the
response to the sub-request.  I think that the Apache server must have
optimized this process by somehow suppressing header generation for
sub-requests.  Certainly I don't see any code in mod_cgi that "knows"
when it is being called via SSI.  Making mod_fastcgi look more like
mod_cgi in its response header generation should cure the problem.

    --mark