This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new e0eb0c094a Better error reporting
e0eb0c094a is described below
commit e0eb0c094a5904b75e55cfc5c18cff88729b4f8d
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Oct 26 23:06:50 2026 +0000
Better error reporting
---
java/org/apache/coyote/http2/Http2AsyncParser.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/http2/Http2AsyncParser.java
b/java/org/apache/coyote/http2/Http2AsyncParser.java
index 2a6a2b47a6..0e9362fcee 100644
--- a/java/org/apache/coyote/http2/Http2AsyncParser.java
+++ b/java/org/apache/coyote/http2/Http2AsyncParser.java
@@ -123,8 +123,12 @@ class Http2AsyncParser extends Http2Parser {
// Finish processing the connection
upgradeHandler.processConnectionCallback(webConnection,
stream);
} else {
- upgradeHandler
- .closeConnection(new
ConnectionException(error.getMessage(), Http2Error.PROTOCOL_ERROR, error));
+ /*
+ * Use the error code of the HTTP/2 error, if there is one, so
that the client is told why the
+ * connection is being closed.
+ */
+ upgradeHandler.closeConnection(error instanceof Http2Exception
http2Exception ? http2Exception :
+ new ConnectionException(error.getMessage(),
Http2Error.PROTOCOL_ERROR, error));
}
// Continue reading frames
upgradeHandler.upgradeDispatch(SocketEvent.OPEN_READ);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]