Open Jaifroid opened 2 years ago
Looks like a bug in Mirrorbrain
@Juz00 We should probably workaround that bug in libkiwix!
The upstream bug is https://github.com/poeml/mirrorbrain/issues/51
Fix in libkiwix about to be merged https://github.com/kiwix/libkiwix/pull/1001
As you can see from https://download.kiwix.org/zim/zimit/courses.lumenlearning.com_en_all_2021-03.zim.magnet (just an example), the magnet links provided by download.kiwix.org contain ampersands that have been converted to the HTML entity format
&
.However, these links are explicitly served as
text/plain
(see screenshot below), not astext/html
, and they are in any case meant to be strings that clients can use, so they should not be coded with HTML entity references.The practical consequence of this is that, for example, in qBittorrent, the magnet link stalls at first because the tracker information provided in the link is not recognized. It is listed as "tracker-less" by qBittorrent. It takes a while for discovery to find the file as a result, and it remains stalled for quite a while.
If, however, I simply substitute all
&
with&
in the string, then qBittorrent can parse it correctly, and download of the file starts immediately.In my implementation in KJSW, I am having to do a replace on the string in my code in order to present a correct URL to the user. However, this replacement should really be done at source IMHO.