> So I have been playing with different combinations of push_handlers() > and it looks like it's working properly for RUN_FIRST handlers (my > initial success with using DECLINED instead of OK) but not RUN_ALL > handlers. argh. > Here's the test case, run make test and check the log to see > which handlers ran. Anyone? well, I added something simple to the test suite, which looks like what you're trying to do, but I couldn't get it to fail. could you adjust this patch so that you can replicate the problem then submit it to dev? that way we have something in the test suite that exhibits the problem so we can replicate it and keep from regressing later on. thanks --Geoff
Index: t/hooks/stacked_handlers2.t
===================================================================
--- t/hooks/stacked_handlers2.t (revision 419883)
+++ t/hooks/stacked_handlers2.t (working copy)
@@ -26,7 +26,7 @@
ran 2 PerlAuthenHandler handlers
ran 2 PerlAuthzHandler handlers
ran 1 PerlTypeHandler handlers
-ran 2 PerlFixupHandler handlers
+ran 4 PerlFixupHandler handlers
ran 2 PerlResponseHandler handlers
ran 2 PerlOutputFilterHandler handlers!;
Index: t/hooks/TestHooks/stacked_handlers2.pm
===================================================================
--- t/hooks/TestHooks/stacked_handlers2.pm (revision 419883)
+++ t/hooks/TestHooks/stacked_handlers2.pm (working copy)
@@ -45,6 +45,17 @@
return Apache2::Const::SERVER_ERROR;
}
+sub push_handlers {
+
+ my $r = shift;
+
+ $r->push_handlers(PerlFixupHandler => \&ok);
+
+ callback($r);
+
+ return Apache2::Const::OK;
+}
+
sub callback {
my $obj = shift;
@@ -167,7 +178,8 @@
# 1 run, 1 left behind
PerlTypeHandler TestHooks::stacked_handlers2::ok TestHooks::stacked_handlers3::server_error
- # all 2 run
+ # all 4 run
+ PerlFixupHandler TestHooks::stacked_handlers2::push_handlers
PerlFixupHandler TestHooks::stacked_handlers2::ok TestHooks::stacked_handlers2::ok
# 2 run, 2 left behind
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.