From 1aa33421e910380e4faf5222f11b5a5c0ff4b858 Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Thu, 23 Oct 2008 18:41:07 +0000 Subject: [PATCH] redirects according to http spec --- deluge/ui/webui/lib/webpy022/http.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/webui/lib/webpy022/http.py b/deluge/ui/webui/lib/webpy022/http.py index 45079f643..3221780a1 100644 --- a/deluge/ui/webui/lib/webpy022/http.py +++ b/deluge/ui/webui/lib/webpy022/http.py @@ -75,8 +75,9 @@ def redirect(url, status='301 Moved Permanently'): # if newloc is relative then make it absolute #mvoncken:Disabled because we don't want to redirect to localhost! - #if newloc.startswith('/'): - # newloc = web.ctx.home + newloc + #mvoncken:back to http-spec, maybe better. + if newloc.startswith('/'): + newloc = web.ctx.home + newloc web.ctx.status = status web.ctx.output = ''