On Fri, 2013-01-11 at 18:34 +0100, Rainer Jung wrote:
> I only had a look at the code and didn't play with it yet. I'm
> positively impressed how complete w.r.t. mod_rewrite compatibility it
> looks and personally I think it is nice and useful.

Thanks !

> One question that came to my mind and which I did not yet try to find
> the answer myself is the merging behavior of the rules if the valve is
> configured at host and context level.

I didn't really think about this scenario. There's no direct interaction
between the two valves. For the current implementation, if the valve in
the context has its config file in /WEB-INF/rewrite.properties, it will
use that. If not, it will try to use
conf/Catalina/localhost/rewrite.properties (the valve defined on the
host will only look there). But there's no rule inheritance or something
like it.

The two rewrite valves will do their processing only once (the valve has
a thread local boolean to avoid rewriting more than once per request).
If both valves do a rewrite, here's the processing (assuming the mapping
of the host and context doesn't change, since the request is pretty much
allowed to bounce between hosts and contexts as long as rewriting occurs
in each host or context):
adapter (mapping 1) -> rewrite in host -> adapter (mapping 2) -> rewrite
in context -> adapter (mapping 3) -> webapp

Rémy



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to