Re: Use an Apache handler after declining another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 19, 2016 at 12:29 PM, Amlaan Kar <amlaan.kar@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux