You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Kew <ni...@webthing.com> on 2009/05/12 09:57:08 UTC
Why does SetHandler have ForceHandler semantics?
Inspired by Rich's feature request in PR#47184, I wondered why
<Directory /foo>
SetHandler FooDefault
AddHandler my-handler .foo .bar
</Directory>
doesn't have "specificity" semantics, wherein the AddHandler
overrides the SetHandler.
Turns out the latter gets set in core_override_type(), which is
a fixups hook, and unconditionally overrides anything set by
mod_mime or other module. The semantics are "ForceType".
Why?
Does something bad happen if we check r->handler for what
some-other-module may have set before overriding it?
--
Nick Kew
Re: Why does SetHandler have ForceHandler semantics?
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Nick Kew wrote:
> Inspired by Rich's feature request in PR#47184, I wondered why
>
> <Directory /foo>
> SetHandler FooDefault
> AddHandler my-handler .foo .bar
> </Directory>
>
> doesn't have "specificity" semantics, wherein the AddHandler
> overrides the SetHandler.
The SetFoo -override- is designed to override all AddFoo soft associations.
> Does something bad happen if we check r->handler for what
> some-other-module may have set before overriding it?
Yes; you break configs (bazillions of them).