You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by rm...@tuxteam.de on 2013/02/11 22:26:41 UTC

Delegating to confiured error page from within a filter

Dear collected list wisdom,

I think I'm hitting a wall here: my  module's filter needs to replace
the running request with the configured error page  for that error 
(all in the 4xx range). The error is detected before any content is
pushed down the bucket line. Setting the request's status will produce
the correct HTTP status line but (of course?) it won't send the error
document as configured in the server's configuration.
Any ideas? 

TIA Ralf Mattes

Re: Delegating to confiured error page from within a filter

Posted by rm...@tuxteam.de.
On Mon, Feb 11, 2013 at 10:26:41PM +0100, rm@tuxteam.de wrote:
> Dear collected list wisdom,
> 
> I think I'm hitting a wall here: my  module's filter needs to replace
> the running request with the configured error page  for that error 
> (all in the 4xx range). The error is detected before any content is
> pushed down the bucket line. Setting the request's status will produce
> the correct HTTP status line but (of course?) it won't send the error
> document as configured in the server's configuration.
> Any ideas? 

Answering my own question:  ap_send_error_response(filter->r, 0) seems
to work just fine (but feels slightly wrong ;-)

 Cheers, RalfD

> TIA Ralf Mattes