Fix extension detection
This commit is contained in:
parent
c20efea1e9
commit
6b0ef500ed
1 changed files with 2 additions and 2 deletions
|
@ -106,11 +106,11 @@ class UiRequest(object):
|
||||||
def getContentType(self, file_name):
|
def getContentType(self, file_name):
|
||||||
content_type = mimetypes.guess_type(file_name)[0]
|
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"
|
content_type = "text/css"
|
||||||
|
|
||||||
if not content_type:
|
if not content_type:
|
||||||
if file_name.endswith("json"): # Correct json header
|
if file_name.endswith(".json"): # Correct json header
|
||||||
content_type = "application/json"
|
content_type = "application/json"
|
||||||
else:
|
else:
|
||||||
content_type = "application/octet-stream"
|
content_type = "application/octet-stream"
|
||||||
|
|
Loading…
Reference in a new issue