Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-26 Thread rbb

On Thu, 26 Sep 2002, Dirk-Willem van Gulik wrote:

> 
> In the department of scratching old itches - any strong objections to me
> adding the following patch which allows one to do things like
> 
>   # httpd.conf
>   ServerRoot ${HOME}/apache
>   Port ${PORT:=80}
>   ErrorDocument 500 "Please contact ${CUSTOMER}
> 
> and then
> 
>   [EMAIL PROTECTED] PORT=1234 ./apachectl start
> 
> as few, if any, people use ${FOO} constructs in their configuration files
> today - the change is rather harmless.
> 
> But I've found this useful (since 1.3.9 :-).
> 
> Objections ?

Just the one that Dean has been harping on for years.  The config file is
not a language, nor should it be.  If you want things like macro
substitution or env variable substitution, then use a pre-processor.  The
web server shouldn't have to worry about stuff like this.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
550 Jean St
Oakland CA 94610
---




Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-26 Thread Dirk-Willem van Gulik



On Thu, 26 Sep 2002, Jim Jagielski wrote:

> After 1.3.27 please :)
>
> I want as little "new stuff" in between now and the release (hopefully
> *very* soon) to avoid problems and complications ;)

No worries- no hurry :-)

Dw




Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-26 Thread Jim Jagielski

After 1.3.27 please :)

I want as little "new stuff" in between now and the release (hopefully
*very* soon) to avoid problems and complications ;)
-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
 will lose both and deserve neither" - T.Jefferson



Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-25 Thread David Burry

This may be confusing because people may begin to expect it to do the substitution at 
request time in certain cases instead of only at server startup time  Admittedly 
that would be almost like turning every directive into mod_rewrite, but... an env var 
is an env var, many things are handled at request time so

Dave


At 03:55 AM 9/26/2002 +0200, Dirk-Willem van Gulik wrote:


>On Thu, 26 Sep 2002, [ISO-8859-1] André Malo wrote:
>
>> I'm note sure, but I'd guess this may cause conflicts with mod_rewrite.
>
>Mod rewrite uses % rather than $ for variable names.
>
>It does use $1, $2.. for back references. Which is not a problem as it is
>not followed by a {.
>
>It also uses the dollar for the end of string match. Which thus is thus
>very unlikely to be followed by a { too.
>
>But...  It also uses the $ for ${mapname:key|default} constructs - which
>may cause an issue now. We can make sure that such is ignored; or amend
>the patch to allow a '\' or extra $ to escape either the $ or the {.
>
>> Otherwise...hmm, the feature probably leads to some weird effects, if
>> you forget to set or to remove some env variables...
>
>Aye - this is all about giving a competent admin enough rope to hang
>him/herself - while making sure that a normal user (who is not having any
>${} constructs in his/her file is unaffected.).
>
>Dw




Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-25 Thread Dirk-Willem van Gulik



On Thu, 26 Sep 2002, [ISO-8859-1] André Malo wrote:

> I'm note sure, but I'd guess this may cause conflicts with mod_rewrite.

Mod rewrite uses % rather than $ for variable names.

It does use $1, $2.. for back references. Which is not a problem as it is
not followed by a {.

It also uses the dollar for the end of string match. Which thus is thus
very unlikely to be followed by a { too.

But...  It also uses the $ for ${mapname:key|default} constructs - which
may cause an issue now. We can make sure that such is ignored; or amend
the patch to allow a '\' or extra $ to escape either the $ or the {.

> Otherwise...hmm, the feature probably leads to some weird effects, if
> you forget to set or to remove some env variables...

Aye - this is all about giving a competent admin enough rope to hang
him/herself - while making sure that a normal user (who is not having any
${} constructs in his/her file is unaffected.).

Dw




Re: [PATCH] add simple ${ENV} substitution during config file read

2002-09-25 Thread André Malo

* Dirk-Willem van Gulik wrote:

> In the department of scratching old itches - any strong objections to
> me adding the following patch which allows one to do things like
> 
>  # httpd.conf
>  ServerRoot ${HOME}/apache
>  Port ${PORT:=80}
>  ErrorDocument 500 "Please contact ${CUSTOMER}
> 
> and then
> 
>  [EMAIL PROTECTED] PORT=1234 ./apachectl start
> 
> as few, if any, people use ${FOO} constructs in their configuration
> files today - the change is rather harmless.
> 
> But I've found this useful (since 1.3.9 :-).
> 
> Objections ?

I'm note sure, but I'd guess this may cause conflicts with mod_rewrite.
Otherwise...hmm, the feature probably leads to some weird effects, if
you forget to set or to remove some env variables... 

Perhaps one should turn it on explicitely with a command line parameter?

nd
-- 
s;.*;aoaaaoaaoaaaom:a:alataa:aaoat:a:a:a
maoaa:a:laoata:a:oia:a:o:a:m:a:o:alaoooat:aaool:aaoaa
matooololaaatoto:aaa:o:a:o:m;;s:\s:\::g;y;mailto:;
\40\51/\134\137|ndparker <[EMAIL PROTECTED]>;;print;