Skip to content

Commit

Permalink
MIME4J-301 ContentTypeFieldImpl: more tests for extra semicolon in pa…
Browse files Browse the repository at this point in the history
…rameters
  • Loading branch information
chibenwa committed Jun 20, 2021
1 parent fa076cf commit 566ebcd
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -43,6 +43,14 @@ public void testMimeTypeWithSemiColonNoParams() throws Exception {
Assert.assertNull(f.getParseException());
}

@Test
public void extraSemicolonShouldNotAbortParameterParsing() throws Exception {
ContentTypeField f = parse("Content-Type: text/html;; charset=utf-8");
Assert.assertEquals("text/html", f.getMimeType());
Assert.assertEquals("utf-8", f.getCharset());
Assert.assertNull(f.getParseException());
}

@Test
public void testGetMimeType() throws Exception {
ContentTypeField f = parse("Content-Type: text/PLAIN");
Expand Down

0 comments on commit 566ebcd

Please sign in to comment.