You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Richard Clarke <ri...@likewhoa.com> on 2003/03/05 14:08:01 UTC

Tracing double accesshandler invocation

Hi,
    I'm trying to figure out why my accesshandler is getting triggered twice
for each request that I make. I'm 100% sure that I'm doing no explicit
lookups/redirects anywhere in my code. The particular uri I am fetching
should only invocate an accesshandler followed by a contenthandler.
After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I
think I'm still non the wiser.
Testing for $r->is_initial_req solves the "problem" but I'm more interested
in finding out exactly why it's being called twice.
Any tips for tracing this easier?

Ric.


Re: Tracing double accesshandler invocation

Posted by Nick Tonkin <ni...@tonkinresolutions.com>.
On Wed, 5 Mar 2003, Richard Clarke wrote:

> Hi,
>     I'm trying to figure out why my accesshandler is getting triggered twice
> for each request that I make. I'm 100% sure that I'm doing no explicit
> lookups/redirects anywhere in my code. The particular uri I am fetching
> should only invocate an accesshandler followed by a contenthandler.
> After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I
> think I'm still non the wiser.
> Testing for $r->is_initial_req solves the "problem" but I'm more interested
> in finding out exactly why it's being called twice.
> Any tips for tracing this easier?
>
> Ric.

Nope, but FWIW I see the same behavior. I'm using mp2, but IIRC the same
thing used to happen on mp1 too.

I too would very much like to figure this out. I sort of suspect it is in
how the httpd.conf auth* directives are specified, but I've never had the
time to really muck around with them.

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>


Re: Tracing double accesshandler invocation

Posted by Nick Tonkin <ni...@tonkinresolutions.com>.
On Thu, 6 Mar 2003, Stas Bekman wrote:

> Nick Tonkin wrote:
> > On Wed, 5 Mar 2003, Richard Clarke wrote:
> >
> >
> >>Hi,
> >>    I'm trying to figure out why my accesshandler is getting triggered twice
> >>for each request that I make. I'm 100% sure that I'm doing no explicit
> >>lookups/redirects anywhere in my code. The particular uri I am fetching
> >>should only invocate an accesshandler followed by a contenthandler.
> >>After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I
> >>think I'm still non the wiser.
> >>Testing for $r->is_initial_req solves the "problem" but I'm more interested
> >>in finding out exactly why it's being called twice.
> >>Any tips for tracing this easier?
> >
> >
> > Nope, but FWIW I see the same behavior. I'm using mp2, but IIRC the same
> > thing used to happen on mp1 too.
> >
> > I too would very much like to figure this out. I sort of suspect it is in
> > how the httpd.conf auth* directives are specified, but I've never had the
> > time to really muck around with them.
>
> If you provide me a simple mp2 setup where this happens, I can debug it.
> However if I run with mp2:
>
> t/TEST -v hooks/access
>
> and log from TestHooks/access.pm every time an access handler is called, I can
> see it called only once per request. So may be play with this test's config
> until you break it. if you succeed to break it, that would be the easiest for
> me to reproduce your problem.


This is on my list of things to do.

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>


Re: Tracing double accesshandler invocation

Posted by Stas Bekman <st...@stason.org>.
Nick Tonkin wrote:
> On Wed, 5 Mar 2003, Richard Clarke wrote:
> 
> 
>>Hi,
>>    I'm trying to figure out why my accesshandler is getting triggered twice
>>for each request that I make. I'm 100% sure that I'm doing no explicit
>>lookups/redirects anywhere in my code. The particular uri I am fetching
>>should only invocate an accesshandler followed by a contenthandler.
>>After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I
>>think I'm still non the wiser.
>>Testing for $r->is_initial_req solves the "problem" but I'm more interested
>>in finding out exactly why it's being called twice.
>>Any tips for tracing this easier?
> 
> 
> Nope, but FWIW I see the same behavior. I'm using mp2, but IIRC the same
> thing used to happen on mp1 too.
> 
> I too would very much like to figure this out. I sort of suspect it is in
> how the httpd.conf auth* directives are specified, but I've never had the
> time to really muck around with them.

If you provide me a simple mp2 setup where this happens, I can debug it. 
However if I run with mp2:

t/TEST -v hooks/access

and log from TestHooks/access.pm every time an access handler is called, I can 
see it called only once per request. So may be play with this test's config 
until you break it. if you succeed to break it, that would be the easiest for 
me to reproduce your problem.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Tracing double accesshandler invocation

Posted by Nick Tonkin <ni...@tonkinresolutions.com>.
On Wed, 5 Mar 2003, Richard Clarke wrote:

> Hi,
>     I'm trying to figure out why my accesshandler is getting triggered twice
> for each request that I make. I'm 100% sure that I'm doing no explicit
> lookups/redirects anywhere in my code. The particular uri I am fetching
> should only invocate an accesshandler followed by a contenthandler.
> After watching the request with MOD_PERL_TRACE=h and MOD_PERL_TRACE=all I
> think I'm still non the wiser.
> Testing for $r->is_initial_req solves the "problem" but I'm more interested
> in finding out exactly why it's being called twice.
> Any tips for tracing this easier?

Nope, but FWIW I see the same behavior. I'm using mp2, but IIRC the same
thing used to happen on mp1 too.

I too would very much like to figure this out. I sort of suspect it is in
how the httpd.conf auth* directives are specified, but I've never had the
time to really muck around with them.

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>