Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty-rewrite.xml: RewriteRule clobbers requestURI

I can upgrade at need.  I was hoping to stick with the distro
integrated with Ubuntu 14.04 in order to simplify management.  As it
happens, I was able to solve that particular issue with a hybrid shim
(a little Java, a little PHP) and the system is, on the whole,
behaving as expected.

On Fri, Apr 11, 2014 at 12:41 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
> Jetty 8.1.3 is old.
> It was released on 16 April 2012 (or approximately 45 stable releases ago).
> For just the jetty-8 branch, that's over 3,500 commits behind!
>
> https://github.com/eclipse/jetty.project/compare/jetty-8.1.3.v20120416...jetty-8
>
> There have been a handful of requestURI related fixes since Jetty 8.1.3
> (notably in Jetty 8.1.5 with forwarded requests)
> Can you upgrade to something a bit more recent in the 8.1.x line?
> Latest release of Jetty 8 is 8.1.14.v20131031
> Found on http://download.eclipse.org/jetty/
>
> Note: we are likely spinning up a new release of jetty 8 in the next 2
> weeks.
>
> If ubuntu hasn't updated its Jetty package, then I would personally avoid
> using that package in a production environment.
>
>
> --
> Joakim Erdfelt <joakim@xxxxxxxxxxx>
> webtide.com - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
>
> On Fri, Apr 11, 2014 at 8:10 AM, Michael Dykman <mdykman@xxxxxxxxx> wrote:
>>
>> Sorry:
>>
>> I am running Jetty 8.1.3-9 as packaged for Ubuntu 14.04 in the apt-get
>> repository.  Using oracle-7 jvm.
>>
>>
>> On Fri, Apr 11, 2014 at 3:00 AM, Thomas Zimmermann
>> <zimmermann.tho@xxxxxxxxx> wrote:
>> >
>> >
>> >
>> > -------- Original message --------
>> > From: Michael Dykman <mdykman@xxxxxxxxx>
>> > Date: 10/04/2014 23:10 (GMT+01:00)
>> > To: jetty-users@xxxxxxxxxxx
>> > Subject: [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.
>> > _______________________________________________
>> > jetty-users mailing list
>> > jetty-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >
>> > _______________________________________________
>> > jetty-users mailing list
>> > jetty-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >
>>
>>
>>
>> --
>>  - 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
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>



-- 
 - michael dykman
 - mdykman@xxxxxxxxx

 May the Source be with you.


Back to the top