This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new e1a48d0609 Add explanatory comment.
e1a48d0609 is described below
commit e1a48d060908588985a2fa58eb4fda49886b0ce0
Author: Mark Thomas <[email protected]>
AuthorDate: Tue May 19 16:14:45 2026 +0100
Add explanatory comment.
---
java/org/apache/coyote/http2/Http2Parser.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/java/org/apache/coyote/http2/Http2Parser.java
b/java/org/apache/coyote/http2/Http2Parser.java
index ac54946a83..11d30be04c 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -678,6 +678,9 @@ class Http2Parser {
/*
* Clear the reference to the stream in the HPack decoder now that the
headers have been processed so that the
* HPack decoder does not retain a reference to this stream. This aids
GC.
+ *
+ * If the connection was created via an upgrade from HTTP/1.1 it is
possible to reach this point before any
+ * HTTP/2 headers frames have been received which means hpackDecoder
will still be null as lazy init is used.
*/
HpackDecoder hpackDecoder = this.hpackDecoder;
if (hpackDecoder != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]