You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/01/06 21:27:33 UTC

[tomcat] branch 8.5.x updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63966

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 55bfb44  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63966
55bfb44 is described below

commit 55bfb4466b6e7ae31f7305bf9de0e2637cd2832c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jan 6 21:25:45 2020 +0000

    Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63966
    
    Switch the message shown when using HTTP to connect to an HTTPS port
    from ISO-8859-1 to UTF-8. This is consistent with Tomcat's use of UTF-8
    by default elsewhere and also results in marginally smaller headers.
---
 java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java | 4 ++--
 webapps/docs/changelog.xml                                   | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
index 00fbd89..6ce27cb 100644
--- a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
+++ b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
@@ -49,11 +49,11 @@ public class TLSClientHelloExtractor {
     private static final int TLS_EXTENSION_ALPN = 16;
 
     public static byte[] USE_TLS_RESPONSE = ("HTTP/1.1 400 \r\n" +
-            "Content-Type: text/plain;charset=ISO-8859-1\r\n" +
+            "Content-Type: text/plain;charset=UTF-8\r\n" +
             "Connection: close\r\n" +
             "\r\n" +
             "Bad Request\r\n" +
-            "This combination of host and port requires TLS.\r\n").getBytes(StandardCharsets.ISO_8859_1);
+            "This combination of host and port requires TLS.\r\n").getBytes(StandardCharsets.UTF_8);
 
 
     /**
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 47d4896..905b93f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -110,6 +110,10 @@
         via the new <code>SSLHostConfig</code> and
         <code>SSLHostConfigCertificate</code> elements. (markt)
       </fix>
+      <fix>
+        <bug>63966</bug>: Switch the message shown when using HTTP to connect to
+        an HTTPS port from ISO-8859-1 to UTF-8. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


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