> Hi All,
>
> I'm looking into whether it's possible to reliably use multiple
> complimentary modules to handle the same directory or location.  The basic
> idea is to create separate modules that might be individually reusable
> (e.g. one handles GETs, another might handle PUT and DELETE).
>
> The obvious (naïve) approach that comes to mind is something like:
>
> - Each registers with ap_hook_handler()
> - Multiple Directory/Location directives, each with its own SetHandler
> - In this scenario, the last configuration merged in wins (that's the
> SetHandler value that r->handler will have on an incoming request)
>
> However, since it's good practice to check handler name in the request and
> decline if it's not yours, the second handler would be prevented from ever
> processing anything.
>
> I can also imagine making this work by modifying (at least) one of the
> handlers so that it isn't configured via SetHandler, and instead uses a
> different directive (a la mod_dav's "DAV on").  In this scenario, I could
> use ap_hook_fixups() to do check that this is a request I really want, and
> set r->handler there.
>
> Before I try this out, I just wanted to find out if there are established
> practices for accomplishing something like this, or if there are enough
> problems that I should just not attempt it.  One problem that I can think
> of offhand is that this probably makes it difficult to implement OPTIONS
> support properly.
>
> Any input would be much appreciated.
>
> Thanks,
>
> curt
>


Sounds like you are looking for more of a configuration rather than a
coding.  See the "LIMIT" section for more info.

Programmatically, just return declined if you don't want your handler to
process the request.

Joe

Reply via email to