httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [PATCH] allow implicit ServerRoot via apxs
Date Tue, 04 Nov 2003 15:47:40 GMT

> Your patch works fine in my config here, but I do forsee one possible 
> issue -- although this is a VERY UNLIKELY problem:
> <IfModule mod_foo.c>
> Include conf/foo.conf
> </IfModule>
> If I read your patch right, it would turn that into:
> <IfModule mod_foo.c>
> </IfModule>
> [rest of httpd.conf]
> [Contents of conf/foo.conf inserted here]

well, I don't think it was my patch that was doing that.  the way I read the 
code is that IfModule is always ignored and Include (and other) directives 
are always parsed.  but yes, I was moving the placement :)

> Obviously, Apache-Test is only really interested in a couple directives 
> from the user's config file, so the chances of that reordering (and 
> removal of code from the conditional block) causing problems is very small.
> As a bit of a side note: Apache 1.3.28 does it the simple way:
> 1) set "ap_server_root" to HTTPD_ROOT (http_main.c: 5396)

that's what we're discussing :)

> 2) set "ap_server_root" to "-d VAL", if present (http_main.c: 5422)

I don't think we can support that easily, since we already have -serverroot 
and it means something different (it's where you run the tests from).  but 
if it comes up again we probably ought to consider it.

> 3) set "ap_server_root" using ServerRoot directive (via normal module 
> initalization stuff)
> Whichever one is hit last is used, since it's a single global value.
> So it seems like setting things up in that order within Apache-Test 
> would be reasonable. But I agree with Stas that having a record of WHICH 
> ServerRoot value is being used is a good thing and would surely ease 
> some confusion in edge cases like mine.

here is yet another approach.  it's pretty verbose, but I think I want 
_some_ warning in there if PREFIX is used, since it's kinda odd.  but maybe 
not on every file resolution, though.  but server_file_rel2abs is the only 
place I can see that uses inherit_config->{ServerRoot} so that seemed like 
the logical place to put everything.  I dunno...

one additional thing the patch does address is a bogus warning I was seeing 
on 1.3 where the file is already absolute.


View raw message