Bug 189497 - net-p2p/deluge not downloading blocklist
Summary: net-p2p/deluge not downloading blocklist
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-09 09:50 UTC by g_amanakis
Modified: 2014-06-05 09:28 UTC (History)
0 users

See Also:


Attachments
file.diff (792 bytes, patch)
2014-05-09 09:50 UTC, g_amanakis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description g_amanakis 2014-05-09 09:50:01 UTC
The following bug exists on the port of Deluge:
Enabling the Blocklist plugin and attempting to download a list fails. The scenario was tested with deluged running as daemon on FreeBSD (built from ports) and a remote GTK-Interface on Windows (official prebuild-binaries) or on Archlinux (through the official repo). Culprit is the httpdownloader.py has not been updated to work with twisted > 13.1.0.

Fix: The following patch resolves the problem:

--- httpdownloader.py.org       2014-05-08 23:36:46.000000000 +0200
+++ httpdownloader.py   2014-05-09 00:05:43.000000000 +0200
@@ -191,8 +191,18 @@
         if not headers:
             headers = {}
         headers["accept-encoding"] = "deflate, gzip, x-gzip"
+
+# In twisted 13.1.0 the _parse() function was replaced by the _URI class
+    if hasattr(client, '_parse'):
+       scheme, host, port, path = client._parse(url)
+    else:
+       from twisted.web.client import _URI
+       uri = _URI.fromBytes(url)
+       scheme = uri.scheme
+       host = uri.host
+       port = uri.port
+       path = uri.path

-    scheme, host, port, path = client._parse(url)
     factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression)
     if scheme == "https":
         from twisted.internet import ssl

Patch attached with submission follows:
How-To-Repeat: See above.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-05-13 05:46:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2014-06-05 09:28:51 UTC
Committed, thank you!