mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 00:48:41 +00:00
use getHeaders which is backwards compatible with twisted
This commit is contained in:
parent
af17346ac6
commit
c1200ed63f
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue