httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: suspendable handlers and internal redirects (mod_dialup vs mod_rewrite)
Date Fri, 02 Nov 2012 02:36:35 GMT
On Sun, Oct 28, 2012 at 9:59 PM, Eric Covener <covener@gmail.com> wrote:
> I was playing with mod_dialup, and for some reason ended up using
> mod_rewrite with it and it broke.
>
> The problem is when an asynch handler returns SUSPENDED from an
> internal redirect:
>
> * ap_internal_redirect() doesn't know to to skip ap_die()
> * ap_internal_redirect() returns void, so the "original" handler who
> did the internal redirect can't know to also return suspended.
>
> I fixed the former, and for the latter I put a kludge into
> ap_internal_redirect() and mod_rewrite's handler_redirect to pass a
> hint via r->notes and it got mod_dialup working.
>
> (Without the second bit, an EOR bucket ends up getting created and
> passed from the original handler returning DONE -- between
> post-suspend callbacks to mod_dialup!)
>
> Could ap_internal_redirect return a status to accomodate this? Some
> return codes would be ambiguous because ap_internal_redirect calls
> more than the handler, but checking for SUSPENDED specifically to
> propagate it back would be pretty clear.
> Or should this be passed back somewhere in the original request_rec
> that callers have to check?

Is it a minor bump to return a value from ap_internal_redirect() or
would I need ap_internal_redirect_ex()?

AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r);

Mime
View raw message