kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
120 stars 56 forks source link

Kiwix-serve random feature returns partly broken URLs #441

Closed kelson42 closed 1 year ago

kelson42 commented 5 years ago

With a ZIM with the article ?_(album_de_Nena) from WPFR. The random button returns the following URL: http://localhost:8080/wikipedia_fr_articles_2019-07/A/?_(album_de_Nena) and it should return http://localhost:8080/wikipedia_fr_articles_2019-07/A/%3F_(album_de_Nena).

kelson42 commented 5 years ago

@mgautierfr The problem here is quite fundamental and is related to URL escaping function, but these functions are not in cause here. The problem is that you can not apply to the whole path escaping properly, you need to apply to each part (namespace, zim url) differently... at the kiwix-serve/kiwix-lib level, you don't have this information anymore!

kelson42 commented 3 years ago

@mgautierfr Moving the random feature in the libzim should help fixing this bug properly right?

mgautierfr commented 3 years ago

No, the random feature in libzim will just keep a random entry in the zim file. The generation of the url will still be in kiwix-lib side.

(I'm moving the issue in kiwix-lib repository)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

kelson42 commented 2 years ago

@mgautierfr I would need a full analysis of the problem/fix here.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

veloman-yunkan commented 2 years ago

This issue seems to be a special case of #775

kelson42 commented 2 years ago

@veloman-yunkan My guess as well.