Received: by taz.hyperreal.com (8.8.4/V2.0) id AAA26836; Sun, 16 Feb 1997 00:40:11 -0800 (PST) Received: from scanner.worldgate.com by taz.hyperreal.com (8.8.4/V2.0) with ESMTP id AAA26822; Sun, 16 Feb 1997 00:40:07 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.5/8.7.3) with UUCP id BAA13695 for new-httpd@hyperreal.com; Sun, 16 Feb 1997 01:40:05 -0700 (MST) Received: from localhost (marcs@localhost) by alive.znep.com (8.7.5/8.7.3) with SMTP id BAA29186 for ; Sun, 16 Feb 1997 01:38:41 -0700 (MST) Date: Sun, 16 Feb 1997 01:38:40 -0700 (MST) From: Marc Slemko To: new-httpd@hyperreal.com Subject: Re: [PATCH] multiple matches at same level In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com On Fri, 7 Feb 1997, Dean Gaudet wrote: > On Fri, 7 Feb 1997, Marc Slemko wrote: > > * http_request.c: directory_walk() misses some directives > > (PR#131). I'm not sure the way things are done is really incorrect, > > but should be looked at. > > The complaint is that if two s match the same dir (at the same > level, i.e. and later on another ) that > it ignores the first one. I posted on this earlier saying that the patch > supplied works but wondered if we wanted to support it this way. After > looking at the code again I noticed that and already > behave in this manner (for obvious reasons). So I'm resubmitting the > patch with my vote. This patch was committed in Dean's performance enhancement patches (97/02/10 07:17:46). I don't recall discussion of that. Was it intentional, or did it accidently slip in there? If we are keeping it (the whole reason I noticed it is because I was going to +1 the patch...) then I will close the PR and commit a spacing change so things are indented correctly; right now it only lines up right if you have ts=6. If not, we should get rid of it. I would recommend keeping it. > > One issue I had with it was that by doing this we don't allow ourselves to > implement a "short circuit" optimization in directory_walk(). But I'm now > of the opinion that directory_walk() is just poorly implemented (it works, > but it's definately the brute-force method) and that there is significant > room for other optimization that would eliminate the benefit from such > a short-circuit. In particular, the // > stuff is static once the config is read, other than .htaccess files. > It might be possible to redo this using lexical scanning techniques, which > fall back to .htaccess and brute-force only when the config requires it. > (I know that high-end servers generally don't require it, 'cause they > can run AllowOverrides None.) Apache 2.0. > > Dean > > Index: http_request.c > =================================================================== > RCS file: /export/home/cvs/apache/src/http_request.c,v > retrieving revision 1.40 > diff -c -3 -r1.40 http_request.c > *** http_request.c 1997/01/25 15:44:39 1.40 > --- http_request.c 1997/02/01 21:40:32 > *************** > *** 370,384 **** > } > else if (!strcmp (this_dir, entry_dir)) > this_conf = entry_config; > - } > > ! if (this_conf) > ! { > ! per_dir_defaults = > ! merge_per_dir_configs (r->pool, per_dir_defaults, this_conf); > ! core_dir =(core_dir_config *)get_module_config(per_dir_defaults, > &core_module); > } > overrides_here = core_dir->override; > > /* If .htaccess files are enabled, check for one. > --- 370,385 ---- > } > else if (!strcmp (this_dir, entry_dir)) > this_conf = entry_config; > > ! if (this_conf) > ! { > ! per_dir_defaults = > ! merge_per_dir_configs (r->pool, per_dir_defaults, this_conf); > ! core_dir =(core_dir_config *)get_module_config(per_dir_defaults, > &core_module); > + } > } > + > overrides_here = core_dir->override; > > /* If .htaccess files are enabled, check for one. > > > > >