You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/02/01 11:02:43 UTC

[Bug 62053] NullPointerException in Http2AsyncUpgradeHandler with Server Push

https://bz.apache.org/bugzilla/show_bug.cgi?id=62053

--- Comment #2 from holger.sunke@bodo-peters.de ---
It seemes to be triggered by a flaw in web application layer. Google Chrome
keeps closing the SSL connection due to Server Push protocol violations.

https://github.com/javaserverfaces/mojarra/issues/4329


Nevertheless I'd suggest to add a [null] check at
Http2AsyncUpgradeHandler.java:158 as return value of
org.apache.coyote.http2.Http2UpgradeHandler.doWriteHeaders(Stream, int,
MimeHeaders, boolean, int) is obviously @Nullable:

 protected HeaderFrameBuffers doWriteHeaders(Stream stream, int pushedStreamId,
MimeHeaders mimeHeaders,
            boolean endOfStream, int payloadSize) throws IOException {
...
  if (!stream.canWrite()) {
            return null;
  }
...
}

This turns the NullPointerException into a more expressive one:

org.apache.catalina.connector.ClientAbortException:
org.apache.coyote.CloseNowException: Connection [1], Stream [10], This stream
is not writable
Caused by: org.apache.coyote.CloseNowException: Connection [1], Stream [10],
This stream is not writable

Tahnks for quick response and kind regards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org