weblib: add mimetypes for ico/png/java
authorNiki Roo <niki@nikiroo.be>
Wed, 20 May 2020 15:34:01 +0000 (17:34 +0200)
committerNiki Roo <niki@nikiroo.be>
Wed, 20 May 2020 15:34:01 +0000 (17:34 +0200)
src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java

index d5ba533f27b5ac746c631ccb2457ea3c3aa3649f..5310c7c104953fdf90ed9ee97b2c4a6cd8c222a6 100644 (file)
@@ -247,6 +247,12 @@ abstract class WebLibraryServerHtml implements Runnable {
                                                                        mimeType = "text/html";
                                                                } else if (uri.endsWith(".js")) {
                                                                        mimeType = "text/javascript";
                                                                        mimeType = "text/html";
                                                                } else if (uri.endsWith(".js")) {
                                                                        mimeType = "text/javascript";
+                                                               } else if (uri.endsWith(".png")) {
+                                                                       mimeType = "image/png";
+                                                               } else if (uri.endsWith(".ico")) {
+                                                                       mimeType = "image/x-icon";
+                                                               } else if (uri.endsWith(".java")) {
+                                                                       mimeType = "text/plain";
                                                                }
                                                                rep = newChunkedResponse(Status.OK, mimeType,
                                                                                in);
                                                                }
                                                                rep = newChunkedResponse(Status.OK, mimeType,
                                                                                in);