libkiwix icon indicating copy to clipboard operation
libkiwix copied to clipboard

Kiwix-serve random feature returns partly broken URLs

Open kelson42 opened this issue 6 years ago • 8 comments

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 avatar Jul 07 '19 13:07 kelson42

@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 avatar Jul 07 '19 13:07 kelson42

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

kelson42 avatar Jan 13 '21 12:01 kelson42

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)

mgautierfr avatar Jan 13 '21 13:01 mgautierfr

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.

stale[bot] avatar Jun 05 '21 01:06 stale[bot]

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

kelson42 avatar Feb 03 '22 15:02 kelson42

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.

stale[bot] avatar Jul 10 '22 23:07 stale[bot]

This issue seems to be a special case of #775

veloman-yunkan avatar Oct 23 '22 16:10 veloman-yunkan

@veloman-yunkan My guess as well.

kelson42 avatar Oct 23 '22 17:10 kelson42