On 18 Jan 2022, at 12:31, Ruediger Pluem <rpl...@apache.org> wrote: > Not sure I get the intention correct, but this looks like a change to core > for a mod_dav specific short coming.
It's not specific to mod_dav, no. I created a patch ages ago for mod_dav_svn that depended on this patch and this got buried under other things, and I have other modules that need the same thing: http://svn.apache.org/viewvc/subversion/branches/mod-dav-svn-expressions/ At the core of the problem is for many modules to work, they need to know the “root” of the URL space, so that a PATH_INFO can be accurately calculated. As soon as you’re in a LocationMatch or DirectoryMatch the root of the URL space is replaced with the regex, and you’re lost. > e.g. in mod_proxy similar problems are solved for ProxyPass that can be used > in and outside Directory / Location elements. The ProxyPass was originally outside of Directory / Location only, I added the option of the one parameter version of ProxyPass that inherited from the Directory / Location, but this (as I recall) doesn't work for regexes. It would be great if the two parameter ProxyPass can go away in future to simplify. > I would be in favor for a similar approach here, by either allowing a second > optional parameter to the 'DAV' directive that sets > this or for a separate directive that allows to set this. In case nothing is > set the cmd->path could be used as currently. > This also allows to use this feature in 'if' sections as well. > Another option would be to provide this information via an environment > variable that can set via SetEnvIfExpr or a RewriteRule. Hmmmm… Adding an extra parameter to DAV, and then to something generic like SetHandler may do the trick. This gives most modules access to a sane path when used inside a Match. Let me think about this for a bit. Regards, Graham —