This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new b8ce4c1cc6 Fix messages and reformat
b8ce4c1cc6 is described below
commit b8ce4c1cc6c590ea4b47f6d7230eb109d87ee9dd
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 2 14:11:52 2026 +0100
Fix messages and reformat
---
java/org/apache/coyote/http2/Stream.java | 14 +++++++-------
webapps/docs/changelog.xml | 4 ++++
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/java/org/apache/coyote/http2/Stream.java
b/java/org/apache/coyote/http2/Stream.java
index aab264d346..f44f4721e7 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -330,7 +330,7 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
// Header names must be lowercase
if (!name.toLowerCase(Locale.US).equals(name)) {
headerException =
- new StreamException(sm.getString("stream.headercase",
getConnectionId(), getIdAsString(), name),
+ new StreamException(sm.getString("stream.header.case",
getConnectionId(), getIdAsString(), name),
Http2Error.PROTOCOL_ERROR, getIdAsInt());
// No need for further processing. The stream will be reset.
return;
@@ -347,7 +347,7 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
if ("te".equals(name)) {
if (!"trailers".equals(value)) {
headerException =
- new StreamException(sm.getString("stream.header.te",
getConnectionId(), getIdAsString(), name),
+ new StreamException(sm.getString("stream.header.te",
getConnectionId(), getIdAsString(), value),
Http2Error.PROTOCOL_ERROR, getIdAsInt());
// No need for further processing. The stream will be reset.
return;
@@ -362,7 +362,7 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
if (name.isEmpty()) {
headerException =
- new StreamException(sm.getString("stream.header.empty",
getConnectionId(), getIdAsString(), name),
+ new StreamException(sm.getString("stream.header.empty",
getConnectionId(), getIdAsString()),
Http2Error.PROTOCOL_ERROR, getIdAsInt());
// No need for further processing. The stream will be reset.
return;
@@ -547,9 +547,8 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
// Match host name with SNI if required
if
(!handler.getProtocol().getHttp11Protocol().checkSni(handler.getSniHostName(),
coyoteRequest.serverName().getString())) {
- headerException = new StreamException(
- sm.getString("stream.host.sni", getConnectionId(),
getIdAsString(), value, handler.getSniHostName()),
- Http2Error.PROTOCOL_ERROR, getIdAsInt());
+ headerException = new
StreamException(sm.getString("stream.host.sni", getConnectionId(),
getIdAsString(),
+ value, handler.getSniHostName()),
Http2Error.PROTOCOL_ERROR, getIdAsInt());
}
}
@@ -565,7 +564,8 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
// Host value inconsistent
headerException = new StreamException(
sm.getString("stream.host.inconsistent",
getConnectionId(), getIdAsString(), value,
- coyoteRequest.serverName().getString(),
Integer.toString(coyoteRequest.getServerPort())),
+ coyoteRequest.serverName().getString(),
+
Integer.toString(coyoteRequest.getServerPort())),
Http2Error.PROTOCOL_ERROR, getIdAsInt());
}
} catch (IllegalArgumentException iae) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cd9b07fdde..e77ddb4a13 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -131,6 +131,10 @@
Refactor the calculation of the real index in the HPACK dynamic header
table implementation to reduce code duplication. (markt)
</scode>
+ <fix>
+ Fix various minor issues with some HTTP/2 stream error messages for
+ HTTP/2. (markt)
+ </fix>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]