Re: Restarting http message

Stanley Gambarin (gambarin@OpenMarket.com)
Wed, 16 Apr 1997 11:02:47 -0400

Message-Id: <199704161502.LAA04482@u4-138.openmarket.com>
To: byersa@agva.com, fastcgi-developers@OpenMarket.com
Subject: Re: Restarting http message
Date: Wed, 16 Apr 1997 11:02:47 -0400
From: Stanley Gambarin <gambarin@OpenMarket.com>

> Mime-Version: 1.0
> To: fastcgi-developers@OpenMarket.com
> Subject: Restarting http message
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> This is a bit of a stretch for me, as I haven't studied the http
> protocol. As usual, I am looking for the easy way out, but I think that
> the question and answer would be instructional for all of us.
> 
> I noticed that when I moved my app from cgi (on NCSA) to fcgi (on Apache
> 1.2b7) that it is much more sensitive to a broken message. This happens
> when I detect an error within the program and branch to an error
> handling form, which resends all the required http protocol text,
> without the previous message terminating properly. With cgi, it did not
> seem to matter, but now the server terminates and restarts. The error
> log shows a "reason: mod_fastcgi: Unterminated CGI response headers, 0
> bytes
>  received from app" entry.
> 
> Someday I will rewrite my code so that this never happens, but is there
> a quick and dirty way to get around this for now? Can I put something at
> the beginning of my error handling code to tell the server to re-init or
> clear?

	The test for the unterminated CGI headers was introduced as of 
version 1.4 of mod_fastcgi.  It was introduced to provide a greater 
compliance with the CGI/1.1 draft.  So, unless you would like to revert to
the version of mod_fastcgi before 1.4 or hack your own, there is no easy
way to remove those checks.
						Hope that was of some help.
								Stanley.