Fix content type detection for options request

This commit is contained in:
shortcutme 2017-01-08 17:27:57 +01:00
parent 2447279191
commit 6c68f8dd6c

View file

@ -49,7 +49,10 @@ class UiRequest(object):
path = re.sub("^http://", "/", path) # Remove begining http for chrome extension .bit access
if self.env["REQUEST_METHOD"] == "OPTIONS":
content_type = self.getContentType(path)
if "/" not in path.strip("/"):
content_type = self.getContentType("index.html")
else:
content_type = self.getContentType(path)
self.sendHeader(content_type=content_type)
return ""