Geoffrey Young wrote:

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?

well, OK, DECLINED, and DONE are all success codes - everything else is an error and goes to the error document cycle.

however, DONE is special - it indicates that all content has been sent and the request cycle should proceed straight to the logging phase. from a handler perspective, DONE behaves the same as an error code - it terminates the request cycle.
But the book doesn't say that DONE does break the chain, though it does.

I suspect that 1.0 logic handled DONE automatically - DONE was captured and passed back to Apache, which took appropriate action. and I suspect this is what you found in 2.0, since you test for DONE but didn't handle it explicitly.
It works exactly the same in 2.0 as in 1.0 (using the current cvs ;), the chain is aborted on !(OK || DECLINED). Any return codes are passed further to Apache.

kudos, stas, for always taking care of all the 2.0 stuff.
;)

__________________________________________________________________
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