httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gearls <nickgea...@gmail.com>
Subject mod_substitute buggy execution order
Date Mon, 19 Dec 2011 14:40:08 GMT
Directive execution order is performed in a very strange way in 
mod_substitute.

Look at the following example:

    Substitute  "s/aaa/global/inq"
    <Location /test/>
      Substitute  "s/aaa/local/inq"
    </Location>

If I have "aaa" in a page, I expect it to be replaced by "global".
No luck, it is replaced by "local".

Even more crazy:

    <Location /test/>
      Substitute  "s/aaa/local1/inq"
    </Location>
    <Location /test/>
      Substitute  "s/aaa/local2/inq"
      Substitute  "s/aaa/local3/inq"
    </Location>

I expect the first directive to execute and see "local1".
No luck again, it is replaced by "local2" - yes, not "local3".

The merging of directive by Apache is performed in the following order: 
global, local1, local2, local3
but directives are executed in the following order: : local2, local3, 
local1, global

Am I confused or should we fix that?

Thanks,

Nick


Mime
View raw message