add default value for content-type

This commit is contained in:
Looly
2019-09-11 08:22:28 +08:00
parent 692397f313
commit 96e377f414
4 changed files with 23 additions and 1 deletions

View File

@@ -263,4 +263,10 @@ public class HttpUtilTest {
String encodeResult = HttpUtil.normalizeParams("参数", CharsetUtil.CHARSET_UTF_8);
Assert.assertEquals("%E5%8F%82%E6%95%B0", encodeResult);
}
@Test
public void getMimeTypeTest() {
String mimeType = HttpUtil.getMimeType("aaa.aaa");
Assert.assertNull(mimeType);
}
}