Open Selaron opened 6 years ago
Small webapp and instructions to reproduce this issue.
Requires Apache Maven, Apache tomcat 9, OpenSSL if JDK 8 is used, JDK 9 if OpenSSL is not present.
The root cause is an issue in Apache Tomcat HTTP2 implementation which is to be fixed as of Apache Tomcat 9.0.7 + 8.5.30.
Issue 62177 https://bz.apache.org/bugzilla/show_bug.cgi?id=62177
Mojarra 2.3.3 implementation of Server Push seemes to frequently produce protocol violations when handling nested resources. A nested resource is e.g. a CSS file which points to an image:
The more resources the CSS references, the lower the likelyhood of pushing it all to the client. In case of an error, the web page does completely or partially fail to load / render and is not usable.
Tested with Chrome 64 and Firefox 58.
Server Runtime: Apache Tomcat 9.0.4 JDK 9 Mojarra 2.3.3 CDI-API 1.2 JBOSS Weld-Servlet 2.2.9.Final
Tested with several HTTP/2 Connector Implementations: JSSE NIO, JSSE NIO2, OpenSSL NIO, OpenSSL NIO2
On error, the browsers tend to close connections and trigger some random runtime exceptions on server side (NullPointers, IOExceptions, ...)
As Primefaces uses plenty of nested resources, viewing the showcase with Mojarra 2.3.3, HTTP/2 and Server Push always fails.