httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: Issues with <If >
Date Mon, 10 Jan 2011 18:21:40 GMT
On Sat, 8 Jan 2011 22:52:48 +0100
Stefan Fritsch <> wrote:

> I am open for ideas how to solve these problems. One idea I had is the 
> following:
> Create a new function ap_if_walk() that handles the <If> sections and 
> is called after ap_location_walk(). Store the <If> sections in a 
> separate array core_dir_config->sec_if, just like <Files> sections are 
> stored in core_dir_config->sec_files. This should allow to use <If> 
> inside <Location>, <Directory>, and <Files>. It may be surprising that

> all <If> sections would be applied last, even if they appeared inside 
> <Directory>. But I think this could be solved with documentation.
> More ideas? Comments?

That sounds like an improvement.  Probably right for 2.4.

But I wonder if there could be some bigger fruit to pick here:
the whole configuration sections behaviour is confusing and perhaps
more complex than should be necessary.

Thought experiment: supposing everything were merged into a single
configuration walk.  What could that look like, and what breaks?

The basic premise has to be mapping filesystem paths to URL-space
paths (i.e. <Directory> and <Files> to <Location>) before walking.
That would be based on what we know in advance: DocumentRoot and
any Aliases, top-level RewriteRules, or equivalent.  I guess we'd
be looking at a new API for mapping modules: maybe provide a hook
in the Filesystem-->URL-space mapping.

Conceptually speaking, does that break anything crucial?

Nick Kew

View raw message