-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
For AS7-6836, I use Netty's HttpTunnelingServlet to tunnel HornetQ access over HTTP.
I have a test that passes with JBoss Web and fails with Undertow.
The netty servlet calls ServletInputStream.available() to check if there are some available bytes to read[1] and create a buffer for them.
Undertow implementation[2] always return 0, the servlet creates a 0-sized array and reads nothing from the input stream.
InputStream.available() javadoc states that "This method should be overridden by subclasses".
So, it's not mandatory but I suspect there are a few servlet implementation that'd rely on having a non-zero value returned by Undertow implementation.
[1] https://github.com/netty/netty/blob/3/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelingServlet.java#L194
[2] https://github.com/undertow-io/undertow/blob/master/servlet/src/main/java/io/undertow/servlet/spec/ServletInputStreamImpl.java