You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/05/30 13:46:30 UTC
[Bug 59641] New: getRequestDispatcher encodes URI
https://bz.apache.org/bugzilla/show_bug.cgi?id=59641
Bug ID: 59641
Summary: getRequestDispatcher encodes URI
Product: Tomcat 8
Version: 8.0.35
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: rz@rdprojekt.pl
In a Jersey REST application I have one of the resources located under
"api/sys:App/{id}" path. When I request this path (/api/sys:App/13) from a
browser Jersey matches the URL and this request is processed. However if the
request is forwarded inside the container (in my case I use urlrewrite) the
request is being forwarded to "/api/sys%3AApp/13" and that does not match the
Jersey path.
To forward the request urlrewrite gets the request dispatcher for this path
dispatcher = request.getRequestDispatcher(toUrl)
and requestURI in the dispatcher is encoded (it wasn't until 8.0.35 release)
see Bug 59317
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59641] getRequestDispatcher encodes URI
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59641
Violeta Georgieva <vi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Violeta Georgieva <vi...@apache.org> ---
Hi,
(In reply to Robert from comment #2)
> OK, the web container does not decode the String, but should id force-encode
> it? The colon character in the path part of an URL is not being encoded in
> the original request, but it is encoded if I use the requestDispatcher to
> forward the request. It looks inconsistent.
>
> --
> Robert
Please ask your questions on tomcat users list.
Regards,
Violeta
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59641] getRequestDispatcher encodes URI
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59641
--- Comment #2 from Robert <rz...@rdprojekt.pl> ---
OK, the web container does not decode the String, but should id force-encode
it? The colon character in the path part of an URL is not being encoded in the
original request, but it is encoded if I use the requestDispatcher to forward
the request. It looks inconsistent.
--
Robert
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59641] getRequestDispatcher encodes URI
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59641
--- Comment #1 from Violeta Georgieva <vi...@apache.org> ---
(In reply to Robert from comment #0)
> In a Jersey REST application I have one of the resources located under
> "api/sys:App/{id}" path. When I request this path (/api/sys:App/13) from a
> browser Jersey matches the URL and this request is processed. However if the
> request is forwarded inside the container (in my case I use urlrewrite) the
> request is being forwarded to "/api/sys%3AApp/13" and that does not match
> the Jersey path.
>
> To forward the request urlrewrite gets the request dispatcher for this path
>
> dispatcher = request.getRequestDispatcher(toUrl)
>
> and requestURI in the dispatcher is encoded (it wasn't until 8.0.35 release)
> see Bug 59317
And the latter is expected and was fixed as a result of the bug that you
mentioned:
http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html#getRequestURI--
"... The web container does not decode this String. ..."
Regards,
Violeta
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org