ap_die() is definitely confused about whether or not it is a recursive error. Any time r->status is set, it thinks it is a recursive error.
On a side note, is it bad for modules to set r->status?
it was because of the former that I thought it was bad to do the latter.
over in mod_perl-land there is the propensity for people to play with $r->status in handlers (due to Apache::Registry using it as a hack). I always tell them that handlers (Perl or C) communicate their status via their return code, not $r->status - doing so will muck with the error document cycle, and no core module does it, so don't do it.
it would be nice to hear somebody verify that here :)
--Geoff
