-
Bug
-
Resolution: Done
-
Major
-
Beta 7
-
None
-
None
When I include the + or @ characters in my REST URL, I get the following exception thrown:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at org.jboss.resteasy.specimpl.UriInfoImpl.<init>(UriInfoImpl.java:99)
at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractUriInfo(ServletUtil.java:65)
(Note that the line numbers may be wrong as I tried many times to fix the problem, but the problem is here alright.
From what I know, I should be able to "GET /foo+bar@gee", which should be decoded as "/foo bar@gee". However I get this exception and no amount of tinkering on my part managed to find an appropriate fix.
What happens is that the request URI "/foo+bar@gee" is given to UriBuilderImpl which escapes these characters (even though they are allows in the path segment from what I think), which leads to the unescaped absolutePath "/foo%2Bbar%40gee" being compared to the encoded path "/foo+bar@gee" which throws this exception.
- is duplicated by
-
RESTEASY-138 Encoding problem in UriInfo initialization
-
- Closed
-