use getHeaders which is backwards compatible with twisted

This commit is contained in:
Damien Churchill 2010-04-01 01:19:46 +01:00
parent af17346ac6
commit c1200ed63f

View File

@ -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: