httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan Edwards" <...@raleigh.ibm.com>
Subject RE: cvs commit: apache-2.0/src/main http_config.c
Date Wed, 10 May 2000 15:29:27 GMT
>
> >   @@ -974,6 +974,9 @@
> >    	if (errmsg != NULL)
> >    	    return errmsg;
> >
> >   +        if (*conftree == NULL && curr_parent != NULL)

> >   +            *conftree = curr_parent;
> >   +        }
> >            if (*conftree == NULL && current != NULL) {
> >                *conftree = current;
> >            }
>
> I don't understand what this does.  The Include directive is
> just another
> directive, so it really shouldn't affect building the config
> tree.  Now,
> how to actually use the Include directive is a completely separate
> problem.  What was the problem you were hitting, and how does
> this solve
> it?
>
> Ryan
>
The problem can be demonstrated by having httpd.conf include a file that has a container as
its
first directive, and which contains a directive that is not valid outside that container's
scope.
e.g.
<Directory "c:/apache/htdocs">
	AllowOverride All
</Directory>

The situation was that when ap_build_config got called (for the included config file) and
ap_build_config_sub got called for the first time with the container directive, it set curr_parent
not current, and thus the container directive got omitted from conftree.

The additional check ensures that conftree will get initialized correctly in this case.

You're correct in that there is nothing wrong with the Include directive itself (that was
just the
testcase), in fact I believe if httpd.conf has a container as its first directive you can
get
similar failures. Hope this clarifies...

Allan


Mime
View raw message