[
https://issues.apache.org/jira/browse/WICKET-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13581576#comment-13581576
]
Martin Grigorov commented on WICKET-4803:
-----------------------------------------
With Servlet it is the same:
- Jetty throws exception:
java.lang.IllegalArgumentException: !hex:25
at org.eclipse.jetty.util.TypeUtil.convertHexDigit(TypeUtil.java:364)
at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:329)
at org.eclipse.jetty.http.HttpURI.decodeQueryTo(HttpURI.java:638)
at org.eclipse.jetty.server.Request.extractParameters(Request.java:213)
at org.eclipse.jetty.server.Request.getParameter(Request.java:679)
at com.example.EchoServlet.handle(EchoServlet.java:29)
at com.example.EchoServlet.doGet(EchoServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
- Tomcat does nothing, just ignores the broken part of the query string
The requested url is: http://localhost:8080/echo?a=c%%%b and Tomcat says that
the value for parameter 'a' is null.
> Unwrapped IllegalArgumentException in WicketURLDecoder
> ------------------------------------------------------
>
> Key: WICKET-4803
> URL: https://issues.apache.org/jira/browse/WICKET-4803
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.8, 6.5.0
> Reporter: Johan Heylen
> Assignee: Martin Grigorov
> Priority: Minor
> Fix For: 1.5.10
>
> Attachments: WICKET-4803-quickstart-testcase-and-example.zip
>
>
> In the class: org.apache.wicket.protocol.http.WicketURLDecoder there are two
> IllegalArgumentException which should be wrapped in WicketRuntimeException,
> otherwise they are caught by the exception handler form the servlet container
> (jetty, tomcat, ...) which then uses their http 500 error code configuration
> instead of the exception handling of wicket.
> Wrapping them would be good for consistency and help manage runtime
> exceptions.
> These are the two exceptions:
> throw new IllegalArgumentException("URLDecoder: Incomplete trailing escape
> (%) pattern");
> throw new IllegalArgumentException("URLDecoder: Illegal hex characters in
> escape (%) pattern - " + e.getMessage());
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira