Rev2067, Fix inner_path stripping
This commit is contained in:
parent
f4f4aa0e50
commit
d467aabd4c
3 changed files with 4 additions and 3 deletions
|
@ -146,7 +146,7 @@ class UiRequestPlugin(object):
|
||||||
extra_headers = []
|
extra_headers = []
|
||||||
self.sendHeader(extra_headers=extra_headers[:])
|
self.sendHeader(extra_headers=extra_headers[:])
|
||||||
return iter([super(UiRequestPlugin, self).renderWrapper(
|
return iter([super(UiRequestPlugin, self).renderWrapper(
|
||||||
site, path, site.address + "//uimedia/plugins/mute/blacklisted.html?address=" + address,
|
site, path, "uimedia/plugins/mute/blacklisted.html?address=" + address,
|
||||||
"Blacklisted site", extra_headers, show_loadingscreen=False
|
"Blacklisted site", extra_headers, show_loadingscreen=False
|
||||||
)])
|
)])
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.5.4"
|
self.version = "0.5.4"
|
||||||
self.rev = 2066
|
self.rev = 2067
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -248,10 +248,11 @@ class UiRequest(object):
|
||||||
|
|
||||||
address = re.sub("/.*", "", path.lstrip("/"))
|
address = re.sub("/.*", "", path.lstrip("/"))
|
||||||
if self.isProxyRequest() and (not path or "/" in path[1:]):
|
if self.isProxyRequest() and (not path or "/" in path[1:]):
|
||||||
file_url = re.sub("^.*?/", "", inner_path)
|
|
||||||
if self.env["HTTP_HOST"] == "zero":
|
if self.env["HTTP_HOST"] == "zero":
|
||||||
root_url = "/" + address + "/"
|
root_url = "/" + address + "/"
|
||||||
|
file_url = "/" + address + "/" + inner_path
|
||||||
else:
|
else:
|
||||||
|
file_url = "/" + inner_path
|
||||||
root_url = "/"
|
root_url = "/"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue