requests and sub-requests

2008-10-12 Thread André Warnier
Hi. I am writing a new PerlAuthHandler module. It is working fine in most cases, but.. In an attempt at being clever, I put the following code in the handler : unless ($r->is_initial_req) { if (defined $r->prev) { # we are in a subrequest. Just copy user from main reque

Re: requests and sub-requests

2008-10-12 Thread Torsten Foertsch
On Sun 12 Oct 2008, André Warnier wrote: > In an attempt at being clever, I put the following code in the > handler : > >      unless ($r->is_initial_req) { >          if (defined $r->prev) { >              # we are in a subrequest.  Just copy user from main > request. $r->user( $r->prev->user ); >

Re: requests and sub-requests

2008-10-12 Thread André Warnier
Torsten, Many thanks for the excellent information, I will ponder that. More below, but one more question here : Where does $r->internal_redirect "live" (in which package) ? I am having trouble finding it. Torsten Foertsch wrote: On Sun 12 Oct 2008, André Warnier wrote: In an attempt at being

Re: requests and sub-requests

2008-10-12 Thread Adam Prime
André Warnier wrote: Torsten, Many thanks for the excellent information, I will ponder that. More below, but one more question here : Where does $r->internal_redirect "live" (in which package) ? I am having trouble finding it. http://perl.apache.org/docs/2.0/api/Apache2/SubRequest.html#C_inte

Re: requests and sub-requests

2008-10-12 Thread André Warnier
Adam Prime wrote: http://perl.apache.org/docs/2.0/api/Apache2/SubRequest.html#C_internal_redirect_ Thanks. Although considering Torsten previous answer and explanation, that's kind of an odd place, no ? ;-) [...] It seems odd to me to set $r->user in an AccessHandler. It's probably not

Re: requests and sub-requests

2008-10-12 Thread Torsten Foertsch
On Sun 12 Oct 2008, André Warnier wrote: > I have a little question related to the above, but not very urgent : > why the check on the configuration change ? what can change between a > request and a sub-request (or internal redirect) ? Suppose this: Require group foo Require group bar If d

Re: requests and sub-requests

2008-10-12 Thread André Warnier
Torsten Foertsch wrote: [...] And I don't think that Apache will skip the mod_perl AAA phases, will it ? Yes, mod_perl handlers are called inside these ap_run_... functions. ap_run_access_checker() is the first of the 3 A's. A PerlAccessHandler is called from this function. Thanks again fo