perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <>
Subject Re: [MP2]mod_perl and index.html
Date Thu, 26 Jun 2008 15:07:36 GMT
On Thu 26 Jun 2008, titetluc titetluc wrote:
> In PerlResponseHandler, $r->main and $r->prev are undefined. I can not
> understand why $r->main AND $r->prev are not defined (intuitively, $r->prev
> should be defined)

I'd expect $r->user to be set, not $r->prev->user nor $r->main->user. But I'd

expect $r->prev to be set because $r is the result of an internal redirect. 
But I am not sure what exactly ap_internal_fast_redirect does.

Oh my, I found it. ap_internal_fast_redirect isn't exactly an internal 
redirect. Instead it overrides the current request with a subreq. Look at 
modules/http/http_request.c. There is a comment that says something about 
that function:

/* XXX: Is this function is so bogus and fragile that we deep-6 it? */
AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)

And yes, it forgets about $r->user at least in apache 2.2.6. Maybe you file a 
bug for apache?

You can check in the AuthenHandler for $r->main. If it is true you can set 
$r->user as well as $r->main->user.


Need professional mod_perl support?
Just hire me:

View raw message