From 8c7f2a44646ff1ca6b4b361046090a9ec12525f0 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Wed, 20 May 2020 17:34:01 +0200 Subject: [PATCH] weblib: add mimetypes for ico/png/java --- src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java index d5ba533..5310c7c 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServerHtml.java @@ -247,6 +247,12 @@ abstract class WebLibraryServerHtml implements Runnable { 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); -- 2.27.0