From c1200ed63f26f10920c13f600122f025dd675516 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Thu, 1 Apr 2010 01:19:46 +0100 Subject: [PATCH] use getHeaders which is backwards compatible with twisted --- deluge/ui/web/server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 7e233c1dc..4e5940a0d 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -562,10 +562,8 @@ class TopLevel(resource.Resource): template = Template(filename=rpath("index.html")) request.setHeader("content-type", "text/html; charset=utf-8") - if request.requestHeaders.hasHeader('x-deluge-base'): - base = request.requestHeaders.getRawHeaders('x-deluge-base')[-1] - else: - base = component.get("DelugeWeb").base + header = request.getHeader('x-deluge-base') + base = header if header else component.get("DelugeWeb").base # validate the base parameter if not base: