-
Bug
-
Resolution: Done
-
Major
-
2.1.0.GA
-
None
-
None
Test case:
an HTTP Request contains invalid characters in the value of an expected http parameter, for example:
http://....?parameter=},xyz{|i
Effect:
The correct response code should be just a simple 400 Bad Request but on the other hand RESTEasy returns an HTTP Status 500 response with a NullPointerException stacktrace in the response body.
From the error logs it is visible that the NullPointerException is being caused by URI creation failing:
24/02/11 16:28:45:045 [ERROR] [[localhost].[/].[Resteasy]] Servlet.service() for servlet Resteasy threw exception
java.lang.NullPointerException
at org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage.<init>(HttpServletInputMessage.java:60)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.createHttpRequest(HttpServletDispatcher.java:237)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:189)
...
...
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.checkChars(URI.java:2982)
at java.net.URI$Parser.parseHierarchical(URI.java:3072)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:578)
at java.net.URI.create(URI.java:840)
... 26 more