mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 00:18:39 +00:00
redirects according to http spec
This commit is contained in:
parent
0896856908
commit
1aa33421e9
1 changed files with 3 additions and 2 deletions
|
@ -75,8 +75,9 @@ def redirect(url, status='301 Moved Permanently'):
|
||||||
|
|
||||||
# if newloc is relative then make it absolute
|
# if newloc is relative then make it absolute
|
||||||
#mvoncken:Disabled because we don't want to redirect to localhost!
|
#mvoncken:Disabled because we don't want to redirect to localhost!
|
||||||
#if newloc.startswith('/'):
|
#mvoncken:back to http-spec, maybe better.
|
||||||
# newloc = web.ctx.home + newloc
|
if newloc.startswith('/'):
|
||||||
|
newloc = web.ctx.home + newloc
|
||||||
|
|
||||||
web.ctx.status = status
|
web.ctx.status = status
|
||||||
web.ctx.output = ''
|
web.ctx.output = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue