From 53a9c217e73add9f87aa3ef0eca779a455210bad Mon Sep 17 00:00:00 2001 From: John Garland Date: Wed, 5 May 2010 04:05:52 +1000 Subject: [PATCH] Fix tracker_icons not handling relative redirects --- deluge/ui/tracker_icons.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/tracker_icons.py b/deluge/ui/tracker_icons.py index b079738f3..245eddf46 100644 --- a/deluge/ui/tracker_icons.py +++ b/deluge/ui/tracker_icons.py @@ -235,7 +235,7 @@ class TrackerIcons(Component): d = f if f.check(error.PageRedirect): # Handle redirect errors - location = error_msg.split(" to ")[1] + location = urljoin(host_to_url(host), error_msg.split(" to ")[1]) d = self.download_page(host, url=location) d.addCallbacks(self.on_download_page_complete, self.on_download_page_fail, errbackArgs=(host,)) @@ -345,7 +345,7 @@ class TrackerIcons(Component): d = f if f.check(error.PageRedirect): # Handle redirect errors - location = error_msg.split(" to ")[1] + location = urljoin(host_to_url(host), error_msg.split(" to ")[1]) d = self.download_icon([(location, extension_to_mimetype(location.rpartition('.')[2]))] + icons, host) if not icons: d.addCallbacks(self.on_download_icon_complete, self.on_download_icon_fail,