-
Bug
-
Resolution: Obsolete
-
Major
-
1.0.6.Final
-
None
I experience random BadRequest using WildFly. I found the problem in io.undertow.server.protocol.http.HttpRequestParser:761 the exception is:
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Buffer.java:532)
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:253)
at io.undertow.server.protocol.http.HttpRequestParser.handleCachedHeader(HttpRequestParser.java:761)
at io.undertow.server.protocol.http.HttpRequestParser.handleHeaderValue(HttpRequestParser.java:636)
at io.undertow.server.protocol.http.HttpRequestParser.handle(HttpRequestParser.java:253)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:133)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:91)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:45)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
The exception is raised from handleCachedHeader function on line 761:
int next = buffer.get(pos + i);
where the pos + i is equals to buffer.limit().
I tryed to understand what the function do, but I cloud not.