This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 1ff15b8ec0 A few more obvious headers not allowed as trailers
1ff15b8ec0 is described below
commit 1ff15b8ec09949e4c0f218dfd399243349e58af7
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Nov 17 11:09:40 2026 +0000
A few more obvious headers not allowed as trailers
---
java/org/apache/tomcat/util/http/HeaderUtil.java | 3 +++
webapps/docs/changelog.xml | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/java/org/apache/tomcat/util/http/HeaderUtil.java
b/java/org/apache/tomcat/util/http/HeaderUtil.java
index c3f5bf5401..2dfc63a001 100644
--- a/java/org/apache/tomcat/util/http/HeaderUtil.java
+++ b/java/org/apache/tomcat/util/http/HeaderUtil.java
@@ -31,6 +31,7 @@ public class HeaderUtil {
// Always add these in lower case
disallowedTrailerFieldNames.add("age");
disallowedTrailerFieldNames.add("cache-control");
+ disallowedTrailerFieldNames.add("connection");
disallowedTrailerFieldNames.add("content-length");
disallowedTrailerFieldNames.add("content-encoding");
disallowedTrailerFieldNames.add("content-range");
@@ -43,8 +44,10 @@ public class HeaderUtil {
disallowedTrailerFieldNames.add("te");
disallowedTrailerFieldNames.add("trailer");
disallowedTrailerFieldNames.add("transfer-encoding");
+ disallowedTrailerFieldNames.add("upgrade");
disallowedTrailerFieldNames.add("vary");
disallowedTrailerFieldNames.add("warning");
+ disallowedTrailerFieldNames.add("www-authenticate");
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 16d3e33363..146218e8f5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -175,6 +175,12 @@
represent a date in the future. Pull request <pr>1152</pr> provided by
Arturo Bernal. (markt)
</fix>
+ <fix>
+ Add <code>connection</code>, <code>upgrade</code>, <code>host</code>,
+ <code>te</code> and <code>www-authenticate</code> to the list of
headers
+ that Tomcat blocks from being sent as an HTTP trailer header.
+ (remm/markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]