|
|
|
@ -13,9 +13,10 @@ public class MimeTypeTest {
|
|
|
|
|
@Test |
|
|
|
|
public void getMimeType() { |
|
|
|
|
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.html")); |
|
|
|
|
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.html?a=ji")); |
|
|
|
|
Assert.assertEquals("text/html", MimeType.parseMimeType("http://a.xml?a=ji")); |
|
|
|
|
Assert.assertEquals("image/jpeg", MimeType.parseMimeType("http://a.jpg?a=ji")); |
|
|
|
|
Assert.assertEquals("image/jpeg", MimeType.parseMimeType("http://a.jpeg?a=ji")); |
|
|
|
|
Assert.assertEquals("truetype", |
|
|
|
|
MimeType.parseMimeType("emb://com/fr/web/ui/resources?path=/com/fr/web/ui/font/iconfont.ttf")); |
|
|
|
|
Assert.assertEquals("font/woff", |
|
|
|
|
MimeType.parseMimeType("http://a.html?path=com/fr/ui/a.woff")); |
|
|
|
|
// 对资源来说不存在http://a.jpg?a=ji这种情况,之前多虑了
|
|
|
|
|
} |
|
|
|
|
} |