Remove unused code, junk lines

This commit is contained in:
shortcutme 2018-10-20 02:34:26 +02:00
parent 3579f9e0c4
commit 8e6494c451
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -176,6 +176,7 @@ class UiRequest(object):
content_type = "application/json" content_type = "application/json"
else: else:
content_type = "application/octet-stream" content_type = "application/octet-stream"
return content_type return content_type
# Return: <dict> Posted variables # Return: <dict> Posted variables
@ -389,7 +390,6 @@ class UiRequest(object):
root_url = "/" + address + "/" root_url = "/" + address + "/"
# Wrapper variable inits # Wrapper variable inits
query_string = ""
body_style = "" body_style = ""
meta_tags = "" meta_tags = ""
postmessage_nonce_security = "false" postmessage_nonce_security = "false"
@ -404,7 +404,6 @@ class UiRequest(object):
else: else:
inner_query_string = "?wrapper_nonce=%s" % wrapper_nonce inner_query_string = "?wrapper_nonce=%s" % wrapper_nonce
if self.isProxyRequest(): # Its a remote proxy request if self.isProxyRequest(): # Its a remote proxy request
if self.env["REMOTE_ADDR"] == "127.0.0.1": # Local client, the server address also should be 127.0.0.1 if self.env["REMOTE_ADDR"] == "127.0.0.1": # Local client, the server address also should be 127.0.0.1
server_url = "http://127.0.0.1:%s" % self.env["SERVER_PORT"] server_url = "http://127.0.0.1:%s" % self.env["SERVER_PORT"]
@ -432,7 +431,6 @@ class UiRequest(object):
if "NOSANDBOX" in site.settings["permissions"]: if "NOSANDBOX" in site.settings["permissions"]:
sandbox_permissions += " allow-same-origin" sandbox_permissions += " allow-same-origin"
if show_loadingscreen is None: if show_loadingscreen is None:
show_loadingscreen = not site.storage.isFile(file_inner_path) show_loadingscreen = not site.storage.isFile(file_inner_path)
@ -509,9 +507,6 @@ class UiRequest(object):
if not path_parts: if not path_parts:
return self.error404(path) return self.error404(path)
# Check wrapper nonce
content_type = self.getContentType(path_parts["inner_path"])
address = path_parts["address"] address = path_parts["address"]
file_path = "%s/%s/%s" % (config.data_dir, address, path_parts["inner_path"]) file_path = "%s/%s/%s" % (config.data_dir, address, path_parts["inner_path"])