Geoffrey Young wrote:

Helmut Zeilinger wrote:

Hi,

i am using mod_perl 1.99_08.

I have two mod_perl handlers:

...
PerlResponseHandler Test::handler0 Test::handler1
...

How can i brake the execution chain between handler0 and handler1? Whatever i try as handler0 return value (OK, DECLINED, FORBIDDEN, 404)
the handler1 is still executed. The documentation says, that any value
except DECLINED should do that.
The documentation talks about a normal (one per phase) handler, not stacked handlers. Which certainly should be covered in the docs as well.

it probably should say that OK, DECLINED, or DONE will allow the chain to continue. anything else ought to immediately terminate the chain - if not, it's probably a bug. you might want to see if there is a difference between returning FORBIDDEN, NOT_FOUND, and SERVER_ERROR (well, their 2.0 equivalents, anyway), just to help track things down.
First of all let's clear up the 1.0 side:

Quoting the eagle book:

The exception to this rule [all handlers will run] is if one of
the handlers in the series returns an error code (anything other than
OK, DECLINED, or DONE)

Though the code does *not* check for DONE:

mod_perl.c:1375
if((status != OK) && (status != DECLINED)) {
...
return status;
}

so where is the bug? In the book or the code?

Now the 2.0 side:

Currently it runs all handlers no matter what, I'll fix that soon to do the same as in 1.0: i.e. checking for OK and DECLINED but not for 'DONE' to be consistent with 1.0.

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

Reply via email to