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 523dfdb Additional changes for BZ 62912 backport 523dfdb is described below commit 523dfdb7fdeada2257eb9f236081ab735426bc87 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri May 21 16:20:03 2021 +0100 Additional changes for BZ 62912 backport --- java/org/apache/tomcat/util/http/parser/MediaType.java | 4 ---- test/org/apache/tomcat/util/http/parser/TestMediaType.java | 12 ++++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/http/parser/MediaType.java b/java/org/apache/tomcat/util/http/parser/MediaType.java index 2c548c0..52203cf 100644 --- a/java/org/apache/tomcat/util/http/parser/MediaType.java +++ b/java/org/apache/tomcat/util/http/parser/MediaType.java @@ -103,10 +103,6 @@ public class MediaType { continue; } result.append(';'); - // Workaround for Adobe Read 9 plug-in on IE bug - // Can be removed after 26 June 2013 (EOL of Reader 9) - // See BZ 53814 - result.append(' '); result.append(entry.getKey()); result.append('='); result.append(entry.getValue()); diff --git a/test/org/apache/tomcat/util/http/parser/TestMediaType.java b/test/org/apache/tomcat/util/http/parser/TestMediaType.java index 9c0a7fa..31391f2 100644 --- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java +++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java @@ -134,9 +134,9 @@ public class TestMediaType { StringReader sr = new StringReader(sb.toString()); MediaType m = MediaType.parseMediaType(sr); - Assert.assertEquals("foo/bar; charset=UTF-8; a=b", m.toString()); + Assert.assertEquals("foo/bar;charset=UTF-8;a=b", m.toString()); Assert.assertEquals(CHARSET, m.getCharset()); - Assert.assertEquals("foo/bar; a=b", m.toStringNoCharset()); + Assert.assertEquals("foo/bar;a=b", m.toStringNoCharset()); } @@ -176,8 +176,8 @@ public class TestMediaType { Assert.assertEquals("\"application/smil;charset=UTF-8\"", m.getParameterValue("Type")); - String expected = "multipart/related; boundary=1_4F50BD36_CDF8C28; " + - "start=\"<31671603.smil>\"; " + + String expected = "multipart/related;boundary=1_4F50BD36_CDF8C28;" + + "start=\"<31671603.smil>\";" + "type=\"application/smil;charset=UTF-8\""; Assert.assertEquals(expected, m.toString()); Assert.assertEquals(expected, m.toStringNoCharset()); @@ -203,7 +203,7 @@ public class TestMediaType { Assert.assertEquals("UTF-8", m.getCharset()); // Note: Invalid input is filtered out - Assert.assertEquals("text/html; charset=UTF-8", m.toString()); + Assert.assertEquals("text/html;charset=UTF-8", m.toString()); Assert.assertEquals("UTF-8", m.getCharset()); } @@ -223,7 +223,7 @@ public class TestMediaType { Assert.assertEquals("UTF-8", m.getParameterValue("charset")); Assert.assertEquals("UTF-8", m.getCharset()); - Assert.assertEquals("text/html; charset=UTF-8", m.toString()); + Assert.assertEquals("text/html;charset=UTF-8", m.toString()); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org