httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Covener" <cove...@gmail.com>
Subject Re: [users@httpd] Serving default error pages after CGI?
Date Tue, 13 Jan 2009 12:21:15 GMT
On Tue, Jan 13, 2009 at 7:11 AM, Sacha Varma <sacha@ssl.co.uk> wrote:
> I've been unable to google up the answer to this, so if anyone can help it
> would be much appreciated.
>
> The CGI standard (RFC 3875, 6.3.3) allows a CGI script to output an HTTP
> status code header (e.g. 'Status: 404 Not Found'). A response body is
> optional.
>
> My CGI program outputs just this status header in certain situations, with
> no body, and I would like Apache to serve the configured ErrorDocument when
> this happens. It is relaying the HTTP status correctly, but at the moment it
> seems to serve the CGI response's body, whether or not there is one, rather
> than falling through to error handling. In other words, I see an empty
> response, rather than the usual Apache 404 page.
>
> Is there a simple way to change this behaviour?
>
> 2.0.53 is what I've been developing with, if that's relevant.

Generally, Apache only uses an ErrorDocument when the status code is
set by the Apache module, not just when it's forwarded by some other
application/server. Internally, the status code for the response is
separate from the "return code" for the handler -- ErrroDocuments are
related to the return codes for the handler itself.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message