httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: [PATCH] config tree problem
Date Fri, 04 Aug 2000 21:22:29 GMT
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:
> <IfModule mod_rewrite.c>
> RewriteEngine on
> RewriteMap    quux-map       prg:/tmp/apache-2.0/
> RewriteRule   ^/~quux/(.*)$  /~quux/${quux-map:$1}
> </IfModule>
> 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.


Greg Stein,

View raw message