Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect formatting of magnet links provided by download.kiwix.org #155

Open
Jaifroid opened this issue Jun 11, 2022 · 4 comments
Open
Assignees

Comments

@Jaifroid
Copy link
Member

Jaifroid commented Jun 11, 2022

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 &.

image

However, these links are explicitly served as text/plain (see screenshot below), not as text/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.

image

@kelson42
Copy link
Collaborator

Looks like a bug in Mirrorbrain

@kelson42 kelson42 self-assigned this Jun 11, 2022
@kelson42
Copy link
Collaborator

@Juz00 We should probably workaround that bug in libkiwix!

@kelson42
Copy link
Collaborator

kelson42 commented Aug 7, 2022

The upstream bug is poeml/mirrorbrain#51

@rgaudin
Copy link
Member

rgaudin commented Oct 9, 2023

Fix in libkiwix about to be merged kiwix/libkiwix#1001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants