Thank You for answering. The method described above is not working. Do I have to make any changes before using the above given code? PS: Both the handlers work properly individually
On Tue, Jul 19, 2016 at 4:44 PM, Yann Ylavic <[email protected]> wrote: > On Tue, Jul 19, 2016 at 12:29 PM, Amlaan Kar <[email protected]> wrote: > > I have two handlers to be accessed. My motive is to use the second > handler > > if the first handler returns DECLINED. > > > > I have tried various combinations of SetHandler, AddHandler and AddType > but > > none has worked as overriding takes place in all of these combinations. > > > > Is there any method in Apache to use more than one handler without > > overriding? > > If the first handler (returning DECLINED) is yours, you can hook it by > specifying its successor(s), e.g.: > > static void my_register_hooks(apr_pool_t *p) > { > static const char * const succs[] = { "mod_running_after.c", NULL }; > > ... > ap_hook_handler(my_handler, NULL, succs, APR_HOOK_<WHATEVER>); > ... > } > > This works for any hook, also by specifying predecessor(s) instead of > the above NULL. > > Regards, > Yann. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
