From 6b0ef500ed05343f8c1404f2d54a76e7b85efaa1 Mon Sep 17 00:00:00 2001 From: MuxZeroNet Date: Thu, 12 Jan 2017 05:22:26 +0000 Subject: [PATCH] Fix extension detection --- src/Ui/UiRequest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ui/UiRequest.py b/src/Ui/UiRequest.py index b0c7caab..4d598244 100644 --- a/src/Ui/UiRequest.py +++ b/src/Ui/UiRequest.py @@ -106,11 +106,11 @@ class UiRequest(object): def getContentType(self, file_name): content_type = mimetypes.guess_type(file_name)[0] - if file_name.endswith("css"): # Force correct css content type + if file_name.endswith(".css"): # Force correct css content type content_type = "text/css" if not content_type: - if file_name.endswith("json"): # Correct json header + if file_name.endswith(".json"): # Correct json header content_type = "application/json" else: content_type = "application/octet-stream"