mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
Fix relative redirecting in blocklist plugin
This commit is contained in:
parent
50cfd9c9b1
commit
fce16ba51f
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@ import os
|
||||||
import time
|
import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from wsgiref.handlers import format_date_time
|
from wsgiref.handlers import format_date_time
|
||||||
|
from urlparse import urljoin
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
@ -281,7 +282,7 @@ class Core(CorePluginBase):
|
||||||
d = f
|
d = f
|
||||||
if f.check(error.PageRedirect):
|
if f.check(error.PageRedirect):
|
||||||
# Handle redirect errors
|
# Handle redirect errors
|
||||||
location = error_msg.split(" to ")[1]
|
location = urljoin(self.config["url"], error_msg.split(" to ")[1])
|
||||||
if "Moved Permanently" in error_msg:
|
if "Moved Permanently" in error_msg:
|
||||||
log.debug("Setting blocklist url to %s", location)
|
log.debug("Setting blocklist url to %s", location)
|
||||||
self.config["url"] = location
|
self.config["url"] = location
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue