Internal redirect from an output filter (Apache2.x)

Internal redirect from an output filter (Apache2.x)

am 07.04.2004 02:51:09 von Sumeet Singh

Hi,
I was wondering if invoking an internal-redirect from within an
output filter is legal. I need to do that from my output filter but want
to make sure that it conforms to apache2.0 API before I go ahead and
design/code it.

thanks,
-ss
p.s.
http_header_filter actually does that (indirectly) by invoking ap_die
while processing an error_bucket. ap_die will call internal-redirect if
the corresponding custom error response (ErrorDocument) is a url.

Re: Internal redirect from an output filter (Apache2.x)

am 07.04.2004 23:40:42 von Sumeet Singh

Can anybody help me out here ?

Sumeet Singh wrote:

> Hi,
> I was wondering if invoking an internal-redirect from within an
> output filter is legal. I need to do that from my output filter but
> want to make sure that it conforms to apache2.0 API before I go ahead
> and design/code it.
>
> thanks,
> -ss
> p.s.
> http_header_filter actually does that (indirectly) by invoking
> ap_die while processing an error_bucket. ap_die will call
> internal-redirect if the corresponding custom error response
> (ErrorDocument) is a url.
>

Re: Internal redirect from an output filter (Apache2.x)

am 08.04.2004 01:31:32 von wrowe

Sumeet Singh wrote:

>> I was wondering if invoking an internal-redirect from within an output filter is legal. I need to do that from my output filter but want to make sure that it conforms to apache2.0 API before I go ahead and design/code it.

I presume this is not safe, but is tolerated by die because we will mop up all
of the resources very soon thereafter. Note that it is only successful if the
headers had not been set up in an earlier call to pass brigade that made it
to the protocol stack. I would look at the log results carefully and trace the
request to ensure you are satisfied with the processing.

It is certainly not recommended, that does not mean it's not possible.

Bill