[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] jetty-rewrite.xml: RewriteRule clobbers requestURI
|
Jetty version?
Jan
On 11 April 2014 07:10, Michael Dykman <mdykman@xxxxxxxxx> wrote:
> 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.
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'