httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Fwd: Unexpected Warnings from Macro Use in 2.4
Date Mon, 24 Aug 2015 15:21:18 GMT
Am 24.08.2015 um 13:40 schrieb Nick Gearls:
> This is definitely a bug as we have a major incompatibility between two
> features.
> Remark: although mod_macro can use $ and % for unescaped characters,
> ${x} is used by Define and %{x} by mod_rewrite :-(

Shooting from the hip:

     &{x}

Haven't checked for implications, but adding "&" to mod_macro with the 
same meaning as "$" and "%" looks trivial to do.

> I suppose the preferred solution to not be incompatible with the current
> situation would be an optional directive to overwrite the $ character
> (DefineChar?)

I think it would be better if httpd core (${x}) and mod_rewrite (%{x}) 
could stay as-is and mod_macro would support yet another prefix like 
"&". Note that there is already support for @{x}, but that has slightly 
different semantics (which doesn't matter in many cases).

Another thing: apart from us providing better and unambiguous syntax, it 
would always be a good idea not to use the same names for macro 
variables and system environment resp. Define variables in your 
configuration. Otherwise chances are good someone (admin) or something 
(software) will misinterpret what actually happens or should happen.

Regards,

Rainer


> -------- Forwarded Message --------
> Subject:     Re: Unexpected Warnings from Macro Use in 2.4
> Date:     Sat, 22 Aug 2015 11:16:44 -0500
> From:     Tom Browder <tom.browder@gmail.com>
> To:     nickgearls@gmail.com, dev@httpd.apache.org <dev@httpd.apache.org>
>
>
> On Tue, Feb 24, 2015 at 7:15 AM, Tom Browder <tom.browder@gmail.com> wrote:
>>
>> On Feb 24, 2015 6:52 AM, "Nick Gearls" <nickgearls@gmail.com> wrote:
>>>
>>> Define mysite   www.mycompany.com
>>>
>>> <Macro NewSite $mysite>
>>>  Servername${mysite}
>>>  ErrorLog /var/log/httpd/${mysite}_error.log
>>> </Macro>
>>>
>>> Use NewSite www.company1.com
>>> Use NewSite www.company2.com
>>
>> That's similar to the way I use it for multiple virtual hosts and have no
>> problems except the warnings I reported.
>
> The problem still exists in 2.4.16.  Shall I file a bug?
>
> -Tom

Mime
View raw message