[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] jetty-rewrite.xml: RewriteRule clobbers requestURI
|
I am unsure if I am looking at a bug or an expected, if
under-documented feature:
A fragment of my jetty-rewrite.xml:
<New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
...
<Set name="rewriteRequestURI">false</Set>
<Set name="rewritePathInfo">false</Set>
<Set name="originalPathAttribute">requestedPath</Set>
...
I have a number of rules in there, none of them particularly
complicated. Most of them are of type 'RewriteRegexRule' although
some of them have been nested into several 'VirtualHostRuleContainer'
objects.
I am testing the url
http://myhost:8080/v2/111/settings
The matching rule in question is defined thus:
<New class="org.eclipse.jetty.rewrite.handler.RewriteRegexRule">
<Set name="regex">^/v2/(.*)</Set>
<Set name="replacement">/webdir/index.php</Set>
<Set name="terminating">true</Set>
</New>
which does redirect my request to the requested script (I am am
running Quercus under Jetty) but the RequestUri and the PathInfo have
been clobbered. I was able to craft a shim to correct those values in
PHP (Quercus is a PHP-on-JVM engine), I am surprised that I had to.
--
- michael dykman
- mdykman@xxxxxxxxx
May the Source be with you.