You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ha...@ooo.lanl.gov> on 1995/03/28 00:38:20 UTC
custom error responses revistited
I've been playing with custom error responses again :-)
The system I have now, finally seems to be stable. Before I upload
a patch file, are there any comments on the scheme..
1) Custom responses are defined in srm.conf and can be updated
with a SIGHUP (kill -1)
The format is..
CustomResponse code redirect|"text
examples,
CustomResponse 404 /cgi-bin/script
CustomResponse 401 /some/doc.html
CustomResponse 500 http://www.backup.site/
CustomResponse 500 /bleah/document_with_includes.html
CustomResponse 403 "Sorry, you're not allowed to access %s
CustomResponse 404 "Go away and don't come back
2) a redirect to a local URL that produces an error, will not
redirect again.
3) CGI scripts and includes will be given some additional CGI vars
with a prefix "X_FAILED_"
e.g.
X_FAILED_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
X_FAILED_HTTP_REFERER=http://ooo.lanl.gov/Bleah/?fred
X_FAILED_HTTP_USER_AGENT=Mozilla/1.0N (X11; HP-UX A.09.05 9000/712)
The above will be generated from any vars which are found to exist
after the problem, along with 2 new variables,
X_FAILED_QUERY_STRING
X_FAILED_URL=
rob
Re: custom error responses revistited
Posted by Brian Behlendorf <br...@wired.com>.
On Mon, 27 Mar 1995, Rob Hartill wrote:
> The system I have now, finally seems to be stable. Before I upload
> a patch file, are there any comments on the scheme..
>
> The format is..
>
> CustomResponse code redirect|"text
We should document the fact that there is no closing quote on the "text bit -
I was going to argue in favor of either requiring one or ignoring it if it's
there, but then I realized people might want quotes in the error message.
Other than that, this looks *fantastic*.
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hotwired.com brian@hyperreal.com http://www.hotwired.com/Staff/brian/