Return null from MockServletContext.getMimeType for unknown type

ServletContext.getMimeType() returns `null` for unknown mime types; not
`application/octet-stream`.

Issue: SPR-14908
This commit is contained in:
Arjen Poutsma
2017-03-23 12:45:48 +01:00
parent fd1db57e05
commit e2aa880301
3 changed files with 9 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ public class MockServletContextTests {
public void getMimeType() {
assertEquals("text/html", sc.getMimeType("test.html"));
assertEquals("image/gif", sc.getMimeType("test.gif"));
assertNull(sc.getMimeType("test.foobar"));
}
/**