httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: Processing .htaccess files inside regex directory containers (revisited).
Date Sun, 22 Aug 1999 11:23:59 GMT
On Fri, 20 Aug 1999, Paul J. Reder wrote:

> Let us assume that there is some large company/university that wants
> to provide web space for all of its employees/students-faculty. Suppose
> further that they decide that classifying the different groups
> (i.e. students vs. professors, or contractors vs. full timers vs. 
> managers) is best done with a small set of reg-ex directory containers
> in the config file.

you're making a lot of assumptions.  give me a real world example.  i
don't think we should be building a webserver for a fantasy really.

is a university going to be so daft that they can't use one of the
following containers?


those aren't regex.  those are handled perfectly fine.

as i pointed out to ken, this is already documented.

> I think we all agree that it is currently broken.

no, we don't agree, otherwise you wouldn't be writing this message
right? :)

let n be the number of components in the path
let m be the number of non-regex <Directory> containers
let r be the number of regex <Directory> containers

directory_walk has to check for .htaccess files in at most n
components of the path (from your comments i'm unclear on whether
you understand that more than one .htaccess file can be applied).

the non-regex containers can be sorted by path length, and there's
an obvious O(n+m) algorithm which we implement to walk the path
picking up (non-regex) <Directory> and .htaccess configurations and
merging them in.

the regex containers are applied once, so we get an O(n+m+r) algorithm.

what you suggest requires us to match the regex containers at every
component of the path, so that we can pick up .htaccess files if
necessary.  that is O(nr+m).  that is crap, sorry.

demonstrate a real need, stop handwaving.


View raw message