Opened 2 months ago
#3440 new bug
charset should be ignored for application/x-bittorrent
Reported by: | megaksa | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | needs verified |
Component: | Core | Version: | master |
Keywords: | Cc: |
Description
deluge version: 2.0.4.dev38 on Arch Linux.
I'm used to use delugesiphon Chrome plugin to add new torrents to server. However after switching to Arch which has latest deluge, the plugin doesn't work anymore for rutracker.org. After the investigation I've found the issue to be deluge itself. httpdownloader. When requesting torrent download rutracker responds with the header: Content-Type: application/x-bittorrent; charset=Windows-1251
While providing charset for this content type IMO doesn't make sense, I suggest to not do re-encoding to UTF-8 for anything besides 'text/...' MIME types.
Attached is a suggested fix produced by diff /usr/lib/python3.8/site-packages/deluge/httpdownloader.py /usr/lib/python3.8/site-packages/deluge/httpdownloader_fixed.py