This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 4a224a7 Additional changes for BZ 62912 backport 4a224a7 is described below commit 4a224a7b14b093c27a83bb32056385ea205af4a1 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri May 21 16:19:51 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 826de19..35a1d74 100644 --- a/test/org/apache/tomcat/util/http/parser/TestMediaType.java +++ b/test/org/apache/tomcat/util/http/parser/TestMediaType.java @@ -142,9 +142,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()); } @@ -184,8 +184,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()); @@ -211,7 +211,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()); } @@ -231,7 +231,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