mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-19 22:58:30 +00:00
use getHeaders which is backwards compatible with twisted
This commit is contained in:
parent
af17346ac6
commit
c1200ed63f
@ -562,10 +562,8 @@ class TopLevel(resource.Resource):
|
|||||||
template = Template(filename=rpath("index.html"))
|
template = Template(filename=rpath("index.html"))
|
||||||
request.setHeader("content-type", "text/html; charset=utf-8")
|
request.setHeader("content-type", "text/html; charset=utf-8")
|
||||||
|
|
||||||
if request.requestHeaders.hasHeader('x-deluge-base'):
|
header = request.getHeader('x-deluge-base')
|
||||||
base = request.requestHeaders.getRawHeaders('x-deluge-base')[-1]
|
base = header if header else component.get("DelugeWeb").base
|
||||||
else:
|
|
||||||
base = component.get("DelugeWeb").base
|
|
||||||
|
|
||||||
# validate the base parameter
|
# validate the base parameter
|
||||||
if not base:
|
if not base:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user