UT000072: Failed to decode url 100% to charset UTF-8
Issue
- We see the following exception at a debug level for some requests that receive 400 responses:
2016-12-02 11:55:18,320 DEBUG [io.undertow.request.io] (default I/O-3) UT005014: Failed to parse HTTP request: java.lang.IllegalArgumentException: UT000072: Failed to decode url 100% to charset UTF-8
at io.undertow.util.URLUtils.decode(URLUtils.java:140)
at io.undertow.server.protocol.http.HttpRequestParser.decode(HttpRequestParser.java:543)
at io.undertow.server.protocol.http.HttpRequestParser.handleQueryParameters(HttpRequestParser.java:525)
at io.undertow.server.protocol.http.HttpRequestParser.beginQueryParameters(HttpRequestParser.java:450)
at io.undertow.server.protocol.http.HttpRequestParser.handlePath(HttpRequestParser.java:374)
at io.undertow.server.protocol.http.HttpRequestParser.handle(HttpRequestParser.java:215)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:182)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:131)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:57)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.6.Final-redhat-1.jar:3.3.6.Final-redhat-1]
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.3.6.Final-redhat-1.jar:3.3.6.Final-redhat-1]
at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1116)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) [xnio-nio-3.3.6.Final-redhat-1.jar:3.3.6.Final-redhat-1]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:559) [xnio-nio-3.3.6.Final-redhat-1.jar:3.3.6.Final-redhat-1]
- Through an AJP proxy, we see 503 responses with an error like the following from the AJP listener:
ERROR [io.undertow.request] (default I/O-2) UT005001: An exception occurred processing the request: java.lang.StringIndexOutOfBoundsException: String index out of range: 6
at java.lang.String.charAt(String.java:658)
at io.undertow.util.URLUtils.decode(URLUtils.java:130)
at io.undertow.util.URLUtils$QueryStringParser.decode(URLUtils.java:273)
at io.undertow.util.URLUtils$QueryStringParser.parse(URLUtils.java:256)
at io.undertow.util.URLUtils.parseQueryString(URLUtils.java:53)
at io.undertow.server.protocol.ajp.AjpRequestParser.parse(AjpRequestParser.java:438)
at io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:169)
at io.undertow.server.protocol.ajp.AjpOpenListener.handleEvent(AjpOpenListener.java:143)
at io.undertow.server.protocol.ajp.AjpOpenListener.handleEvent(AjpOpenListener.java:52)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:131)
at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
Environment
- JBoss Enterprise Application Platform (EAP) 7.x
- Undertow
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.