Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.26
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
1> Configure the RewriteHandler in jetty.xml as follows.
<Set name="handler">
<New id="Handlers"
class="org.mortbay.jetty.handler.rewrite.RewriteHandler">
<Set name="rewriteRequestURI">true</Set>
<Set name="rewritePathInfo">false</Set>
<Set name="originalPathAttribute">requestedPath</Set>
<Call name="addRule"><Arg><New
class="org.mortbay.jetty.handler.rewrite.MsieSslRule"/></Arg></Call>
<!-- map convenience URLs to the webapp that handles them -->
<Call
name="addRewriteRule"><Arg>/foo/*</Arg><Arg>/service/foo</Arg></Call>
</New>
</Set>
2> Configure a Servlet to handle requests sent to /service/foo
3> Send the request as http://<host>:<port>/service/foo/a%2Fb
request.getRequestURI() on the Servlet returns "/service/foo/a%2Fb".
This is correct.
4> Send the request as http://<host>:<port>/foo/a%2Fb
request.getRequestURI() on the Servlet returns "/service/foo/a/b".
This is wrong, it should be "/service/foo/a%2Fb
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Michael Gorovoy [ mgorovoy ] |
| Affects Version/s | 6.1.26 [ 16660 ] | |
| Description |
1> Configure the RewriteHandler in jetty.xml as follows. <Set name="handler"> <New id="Handlers" class="org.mortbay.jetty.handler.rewrite.RewriteHandler"> <Set name="rewriteRequestURI">true</Set> <Set name="rewritePathInfo">false</Set> <Set name="originalPathAttribute">requestedPath</Set> <Call name="addRule"><Arg><New class="org.mortbay.jetty.handler.rewrite.MsieSslRule"/></Arg></Call> <!-- map convenience URLs to the webapp that handles them --> <Call name="addRewriteRule"><Arg>/foo/*</Arg><Arg>/service/foo</Arg></Call> </New> </Set> 2> Configure a Servlet to handle requests sent to /service/foo 3> Send the request as http://<host>:<port>/service/foo/a%2Fb request.getRequestURI() on the Servlet returns "/service/foo/a%2Fb". This is correct. 4> Send the request as http://<host>:<port>/foo/a%2Fb request.getRequestURI() on the Servlet returns "/service/foo/a/b". This is wrong, it should be "/service/foo/a%2Fb |
1> Configure the RewriteHandler in jetty.xml as follows.
<Set name="handler"> <New id="Handlers" class="org.mortbay.jetty.handler.rewrite.RewriteHandler"> <Set name="rewriteRequestURI">true</Set> <Set name="rewritePathInfo">false</Set> <Set name="originalPathAttribute">requestedPath</Set> <Call name="addRule"><Arg><New class="org.mortbay.jetty.handler.rewrite.MsieSslRule"/></Arg></Call> <!-- map convenience URLs to the webapp that handles them --> <Call name="addRewriteRule"><Arg>/foo/*</Arg><Arg>/service/foo</Arg></Call> </New> </Set> 2> Configure a Servlet to handle requests sent to /service/foo 3> Send the request as http://<host>:<port>/service/foo/a%2Fb request.getRequestURI() on the Servlet returns "/service/foo/a%2Fb". This is correct. 4> Send the request as http://<host>:<port>/foo/a%2Fb request.getRequestURI() on the Servlet returns "/service/foo/a/b". This is wrong, it should be "/service/foo/a%2Fb |
| Summary | Rewrite handler does not handle encoded URIs | Rewrite handler does not handle encoded URIs correctly |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |