Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 7321 invoked by uid 500); 4 Aug 2000 21:17:44 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 7289 invoked from network); 4 Aug 2000 21:17:42 -0000 Date: Fri, 4 Aug 2000 14:22:29 -0700 From: Greg Stein To: new-httpd@apache.org, trawick@ibm.net Subject: Re: [PATCH] config tree problem Message-ID: <20000804142229.N19525@lyra.org> Mail-Followup-To: new-httpd@apache.org, trawick@ibm.net References: <200008042101.RAA32170@adsl-77-240-89.rdu.bellsouth.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200008042101.RAA32170@adsl-77-240-89.rdu.bellsouth.net>; from trawickj@bellsouth.net on Fri, Aug 04, 2000 at 05:01:25PM -0400 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Fri, Aug 04, 2000 at 05:01:25PM -0400, Jeff Trawick wrote: > I was surprised to find a config tree problem. > > The following configuration file demonstrates the problem: > > > RewriteEngine on > RewriteMap quux-map prg:/tmp/apache-2.0/map.quux.pl > RewriteRule ^/~quux/(.*)$ /~quux/${quux-map:$1} > > > After this config file is parsed, the only statement in the config > tree is the last statement in the IfModule container ("RewriteRule blah > blah"). > > The problem is that when ap_build_config_sub() handles this type of > construct, it moves *current to the end of the list before returning. > If this construct were the first thing in the file, the caller would > set conftree to *current, not realizing that there were list elements > before *current. The caller doesn't have addressability to those list > elements. > > With the patch below, ap_build_config_sub() sets *conftree before > walking *current to the end of the list. > > Comments? Anybody have a better fix? I'll test this a bit more in > the meantime. If it works, then just go for it. The building of the config tree needs an overall review. It feels a bit too fragile right now. There are probably a couple key abstractions or focal points that would collapse it all down into much more simple code. Just need to find time to do it... sigh. Cheers, -g -- Greg Stein, http://www.lyra.org/