From 853209d005bbc98e7c14a1f5c9b01f376da3cfc4 Mon Sep 17 00:00:00 2001 From: Fabio Ambauen <1833932+open-dynaMIX@users.noreply.github.com> Date: Sun, 3 Jan 2021 11:57:02 +0100 Subject: [PATCH] fix: set charset in webmanifest content-type and also test serving it --- tests/tests.py | 5 +++++ webui.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests.py b/tests/tests.py index 7dae0800..a394ec78 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -72,6 +72,11 @@ class TestsRequests: 200, "application/xml; charset=UTF-8", ), + ( + "static/favicons/site.webmanifest", + 200, + "application/manifest+json; charset=UTF-8", + ), ( "static/fontawesome-free-5.0.2/css/fontawesome-all.min.css", 200, diff --git a/webui.lua b/webui.lua index 3c4fa5bc..184b428f 100644 --- a/webui.lua +++ b/webui.lua @@ -432,7 +432,7 @@ local function get_content_type(file_type) elseif file_type == 'mp3' then return 'audio/mpeg' elseif file_type == 'webmanifest' then - return 'application/manifest+json' + return 'application/manifest+json; charset=UTF-8' end end