mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
Fix #2355 previous fix wasn't entirely correct - thanks Thomas Hipp
This commit is contained in:
parent
06ee112344
commit
8bf18d6694
1 changed files with 2 additions and 2 deletions
|
@ -196,12 +196,12 @@ def download_file(url, filename, callback=None, headers=None, force_filename=Fal
|
||||||
if hasattr(client, '_parse'):
|
if hasattr(client, '_parse'):
|
||||||
scheme, host, port, path = client._parse(url)
|
scheme, host, port, path = client._parse(url)
|
||||||
else:
|
else:
|
||||||
from twisted.web import _URI
|
from twisted.web.client import _URI
|
||||||
uri = _URI.fromBytes(url)
|
uri = _URI.fromBytes(url)
|
||||||
scheme = uri.scheme
|
scheme = uri.scheme
|
||||||
host = uri.host
|
host = uri.host
|
||||||
port = uri.port
|
port = uri.port
|
||||||
path = uri.originFrom
|
path = uri.path
|
||||||
|
|
||||||
factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression)
|
factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression)
|
||||||
if scheme == "https":
|
if scheme == "https":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue