mojarra icon indicating copy to clipboard operation
mojarra copied to clipboard

Server Push frequently fails with nested resources

Open Selaron opened this issue 7 years ago • 2 comments

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:

CSS reference in Facelet: <h:head><h:outputStylesheet name="theme.css" /></h:head>

Image reference in CSS: background-image: url('#{resource['any.png']}');

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.

Selaron avatar Jan 31 '18 09:01 Selaron

issue4329.zip

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.

Selaron avatar Jan 31 '18 10:01 Selaron

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

Selaron avatar Mar 19 '18 10:03 Selaron