httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Re: Issues with <If >
Date Sat, 08 Jan 2011 23:43:24 GMT

----- "Stefan Fritsch" <sf@sfritsch.de> wrote:

> Hi,
> 
> there are some serious problems with how <If ...> is implemented right
> 
> now:
> 
> 1) It is hooked into ap_file_walk() which is only called in the 
> map_to_storage hook. This means that it is not executed for non-file 
> requests like ProxyPass'ed requests. This reduces its usefulness a 
> great deal.
> 
> 2) ap_file_walk() will happily reuse a cached file walk result if the
> 
> file name is identical (see the 'strcmp(test_file, cache->cached) == 
> 0' check). While I haven't been able to trigger wrong behaviour so 
> far, I am pretty sure that this will give the wrong result for <If> in
> 
> some corner cases.
> 
> 3) <If > can be used at VHost level and inside <Directory> blocks. But
> 
> it cannot be used inside <Location> blocks (trying to do so will give
> 
> a startup error), which reduces the usefulness even more.
> 
> 4) <If > blocks inside <Files> blocks are silently ignored.
> 
> 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

In how far would this impact performance?

> 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?
> 
> Cheers,
> Stefan

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/

Mime
View raw message