Rev1855, Fix content type detection, Formatting
This commit is contained in:
parent
57a0d4f8a6
commit
a08114b1b0
2 changed files with 4 additions and 5 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.5.1"
|
self.version = "0.5.1"
|
||||||
self.rev = 1852
|
self.rev = 1855
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -334,13 +334,12 @@ class UiRequest(object):
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
# Serve a media for site
|
# Serve a media for site
|
||||||
def actionSiteMedia(self, path, header_length=True):
|
def actionSiteMedia(self, path, header_length=True):
|
||||||
path_parts = self.parsePath(path)
|
path_parts = self.parsePath(path)
|
||||||
|
|
||||||
# Check wrapper nonce
|
# 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
|
if "htm" in content_type: # Valid nonce must present to render html files
|
||||||
wrapper_nonce = self.get.get("wrapper_nonce")
|
wrapper_nonce = self.get.get("wrapper_nonce")
|
||||||
if wrapper_nonce not in self.server.wrapper_nonces:
|
if wrapper_nonce not in self.server.wrapper_nonces:
|
||||||
|
|
Loading…
Reference in a new issue