Rev1855, Fix content type detection, Formatting

This commit is contained in:
shortcutme 2017-02-02 12:51:41 +01:00
parent 57a0d4f8a6
commit a08114b1b0
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 4 additions and 5 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.5.1"
self.rev = 1852
self.rev = 1855
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View file

@ -334,13 +334,12 @@ class UiRequest(object):
else:
return None
# Serve a media for site
def actionSiteMedia(self, path, header_length=True):
path_parts = self.parsePath(path)
# Check wrapper nonce
content_type = self.getContentType(path)
content_type = self.getContentType(path_parts["inner_path"])
if "htm" in content_type: # Valid nonce must present to render html files
wrapper_nonce = self.get.get("wrapper_nonce")
if wrapper_nonce not in self.server.wrapper_nonces: