httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 59299] mod_macro syntax clash
Date Tue, 12 Apr 2016 14:23:10 GMT

Eric Covener <> changed:

           What    |Removed                     |Added
                 OS|                            |All

--- Comment #1 from Eric Covener <> ---
Does the % syntax actually clash in any meaningful way?

AIUI the only reason $ clashes is because the core of the server looks to
expand $ variables from the native environment / mod_define before directives
even get to process the arguments.

But the % usage in a macro is expanded before mod_rewrite ever takes a look at
the variables.

(99% of directives are like RewriteCond/RewriteRule. 1% are of a special type
called "EXEC_ON_READ" which basically means some evaluation is done immediately
-- those are the problematic ones because they run earlier then everything

For example this works:

<Macro rewriteme %rule %subst %condvar %condval>
RewriteEngine ON
RewriteCond %{%condvar} %condval
RewriteRule %rule %subst

<virtualhost *:80>
Use rewriteme .* /XXX HTTP_HOST .*

Should we just prefer % and then @ if you don't like looking at %{%... in
expressions/mod_Rewrite and relegate to $ as a last resort?

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message