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

markt 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 51e8b1cc73 Invoke toStringType instead of toString in MimeHeaders
51e8b1cc73 is described below

commit 51e8b1cc734239b3fd83d81f6133fd6521b7fd50
Author: Adwait Kumar Singh <adwsi...@amazon.com>
AuthorDate: Wed Jan 29 14:43:45 2025 -0800

    Invoke toStringType instead of toString in MimeHeaders
---
 java/org/apache/tomcat/util/http/MimeHeaders.java | 2 +-
 webapps/docs/changelog.xml                        | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/MimeHeaders.java 
b/java/org/apache/tomcat/util/http/MimeHeaders.java
index 43b089451d..0263e5711b 100644
--- a/java/org/apache/tomcat/util/http/MimeHeaders.java
+++ b/java/org/apache/tomcat/util/http/MimeHeaders.java
@@ -382,7 +382,7 @@ public class MimeHeaders {
 
     public String getHeader(String name) {
         MessageBytes mh = getValue(name);
-        return mh != null ? mh.toString() : null;
+        return mh != null ? mh.toStringType() : null;
     }
 
     // -------------------- Removing --------------------
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f51364d2ac..e85b823ce4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -232,6 +232,10 @@
         <bug>69545</bug>: Improve CRLF skipping for the <code>available</code>
         method of the <code>ChunkedInputFilter</code>. (remm)
       </fix>
+      <fix>
+        Improve the performance of repeated calls to <code>getHeader()</code>.
+        Pull request <pr>813</pr> provided by Adwait Kumar Singh. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to