Page 1 of 1

core:305 Blocklist download failed: 200 OK

Posted: Thu Feb 28, 2019 3:24 am
by bibiz99944x
Hi,

Got this warning trying to update blocklist
[DEBUG ] 21:17:16 core:259 Attempting to download blocklist http://cdn2.iblocklist.com/files/eqkgwz ... aybcssw.gz
[DEBUG ] 21:17:16 core:260 Sending headers: {'If-Modified-Since': 'Mon, 06 Aug 2018 22:11:48 GMT'}
[WARNING ] 21:17:16 core:305 Blocklist download failed: 200 OK
[DEBUG ] 21:17:16 core:307 Let's try again
[DEBUG ] 21:17:16 core:259 Attempting to download blocklist http://list.iblocklist.com/?list=ydxerp ... eformat=gz
[DEBUG ] 21:17:16 core:260 Sending headers: {'If-Modified-Since': 'Mon, 06 Aug 2018 22:11:48 GMT'}
[DEBUG ] 21:17:16 core:259 Attempting to download blocklist http://cdn1.iblocklist.com/files/eqkgwz ... aybcssw.gz
[DEBUG ] 21:17:16 core:260 Sending headers: {'If-Modified-Since': 'Mon, 06 Aug 2018 22:11:48 GMT'}
[WARNING ] 21:17:16 core:305 Blocklist download failed: 200 OK
[DEBUG ] 21:17:16 core:307 Let's try again

Did a little digging to find the cause because de logs were no use then I got this by printing the stacktrace :
[WARNING ] 21:59:55 core:306 Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 597, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in doRead
return self._dataReceived(data)
File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 215, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 571, in dataReceived
why = self.lineReceived(line)
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 459, in lineReceived
self.handleEndHeaders()
File "/usr/lib/python2.7/dist-packages/twisted/web/client.py", line 144, in handleEndHeaders
self.factory.gotHeaders(self.headers)
File "/usr/lib/python2.7/dist-packages/deluge/httpdownloader.py", line 89, in gotHeaders
new_file_name = str(headers["content-disposition"][0]).split(";")[1].split("=")[1]
IndexError: list index out of range

iblocklist site http headers return

Code: Select all

Content-Disposition: attachment
and the code expect

Code: Select all

Content-Disposition: attachment; filename="filename.ext"
Deluge version 1.3.15 on Ubuntu 18.04.2.

Thanks.

Re: core:305 Blocklist download failed: 200 OK

Posted: Thu Feb 28, 2019 3:44 am
by bibiz99944x
Here's a fix.

Change line 88 of httpdownloader.py from

Code: Select all

if "content-disposition" in headers and not self.force_filename:
to

Code: Select all

if "content-disposition" in headers and headers["content-disposition"].find("filename=") != -1 and not self.force_filename:
Bug still present in master on git.

Re: core:305 Blocklist download failed: 200 OK

Posted: Thu Mar 28, 2019 4:35 am
by Rosenblau
Your fix did not work in Linux Mint, some error about using 'find'.

This is the bug in 1.3.15 that stops the Blocklist from updating. It effects all versions, both linux and windows.

There is a fixed file for Linux for this on https://dev.deluge-torrent.org/changeset/ffb8d9f8c Just copy paste it over the existing httpdownloader.py.

In windows the file httpdownloader.pyc needs replacing. Either extract a newer version from the beta or convert the py into a pyc. Or use this file
httpdownloader.zip
fixed httpdownloader.pyc for windows 1.3.15
(3.47 KiB) Downloaded 516 times
and copy paste it over the file in windows.