Reply To: Handle illegal hex characters in url

Splash Forums Rewrite Users Handle illegal hex characters in url Reply To: Handle illegal hex characters in url

#27323

susnet
Participant

I’m using 2.0.12.Final. I also tried 3.0.0.Alpha10 and it’s the same problem. Here is the log and stack trace for 3.0.0.Alpha10:

10:33:05,308 SEVERE [org.ocpsoft.rewrite.AbstractRewrite] (default task-2) Rewrite rule evaluation for event [InboundRewrite [GET url=http://mydomain.com/search/3%25%20fat, flow=FORWARD, dispatchResource=/pages/search.xhtml?query=3% fat]]
Rule 0: .addRule(Join.path(“/search/{query}”).to(“/pages/search.xhtml?query={query}”)) defined at mydomain.util.RewriteConfigurationProvider.getConfiguration(RewriteConfigurationProvider.java:200)

10:33:05,309 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /search/3%25%20fat: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern – For input string: ” f”
at java.net.URLDecoder.decode(URLDecoder.java:194)
at io.undertow.util.QueryParameterUtils.decodeParam(QueryParameterUtils.java:134)
at io.undertow.util.QueryParameterUtils.handleQueryParameter(QueryParameterUtils.java:118)
at io.undertow.util.QueryParameterUtils.parseQueryString(QueryParameterUtils.java:106)
at io.undertow.util.QueryParameterUtils.mergeQueryParametersWithNewQueryString(QueryParameterUtils.java:151)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:172)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:108)
at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:42)
at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:297)
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:198)