This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 73378f9a02 A few more obvious headers not allowed as trailers
73378f9a02 is described below

commit 73378f9a026b13b5c237d536dadedcbc6e31c60c
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 016bdf5496..1bff1ea2e9 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]

Reply via email to