Stefan de Konink wrote:
>
> Hi,
>
> http://www.cherokee-project.com/archive/2005-May/000673.html
>
> As was requested several years ago, there is a serious missing feature in
> Cherokee. When someone specifies the custom error documents (CGI), the
> 'original' filename cannot be resolved anymore.
>
> Cherokee should add the following envirionment variables to solve the
> issue:
>
> * REDIRECT_URL: the URL-path that was not found. If a user asks for
> the nonexistent page http://www.example.com/lunch/pastrami.html, for
> example, this variable is set to /lunch/pastrami.html.
>
> * REDIRECT_STATUS: the HTTP response status resulting from the request
> for the original page. In our case, this is always "404". You can use
> ErrorDocument with other status codes, though, so if you have one
> error-handling page for multiple statuses, you can use this variable to
> determine which error status caused the error-handling page to be loaded.
>
> * REDIRECT_ERROR_NOTES: a brief description of what went wrong, for
> example, "File does not exist:
> /usr/local/apache/docroot/lunch/pastrami.html".
Yes, but I would add also a:
* REDIRECT_ERROR_NUMBER: an internal unique error number
that can be used by the *CGI program to show a nationalized
error message besides the standard english message.
> * REDIRECT_REQUEST_METHOD: the method of the request for the original
> page, such as GET or POST.
>
> Now there is a 'cherokee_handler_cgi_add_env_pair', but I guess that this
> will not affect the handler_error_redir which is used for the Error
> Documents. So I guess there should be something in the style of
> handler_error which a cgi execute method. (I guess a mash up like handler
> phpcgi.)
>
> Could anyone comment?
Yes, there are two distinct cases:
- redirecting to a URL pointing to a static file;
- redirecting to a URL handled by a dynamic program
(*CGI) that needs the whole request context
to show the proper user error message.
--
Nick Name: A.D.F.
E-Mail: <adefacc () tin ! it>
E-Mail-Format: Plain Text only (please); view using font Courier New
--
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee