Project: Tomcat
Bug 55978 Initial call to onWritePossible() not made by container when using HTTP upgrade
Reported: 2014-01-08 10:37:25 | Status: resolved fixed

When using a WriteListener and non-blocking IO with the Servlet async API, the container makes the first call to onWritePossible() as per the spec. When using a WriteListener and non-blocking IO with the Servlet HTTP upgrade API the container does not make the initial call to onWritePossible(). When fixing this bug it is worth checking the initial call to onDataAvailable() as well.

Files changed in fix:
java/org/apache/coyote/AbstractProtocol.java java/org/apache/coyote/http11/upgrade/AbstractProcessor.java java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java java/org/apache/coyote/http11/upgrade/AprServletOutputStream.java java/org/apache/coyote/http11/upgrade/BioServletOutputStream.java java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java test/org/apache/coyote/http11/upgrade/TestUpgrade.java