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: auto configuration

2008-10-12 Thread adam . prime
Quoting valerio crini <[EMAIL PROTECTED]>: Hallo, I'm trying to use modperl2's feature 'auto configuration' but without success. Manual says in http://perl.apache.org/docs/general/testing/testing.html#Auto_Configuration that in order to add automatically new items to location is necessary add

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

sethandlers question

2008-10-12 Thread André Warnier
Hi. Still around a new perl AAA module I'm writing, a question : If I have a Location like so : SetHandler jakarta-servlet SetEnvIf REQUEST_URI "\.(htm|web|css|gif|jpg|js|html?)$" no-jk PerlXXXHandler My::Module->some_method ... ("jakarta-servlet" above means mod_jk --> Tomcat) (

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