Closed DarkmatterUAE closed 1 year ago
Some testing of my own:
Digging through the issues give me some insight of how the problem may be, so I replaced the question mark in the url with %3F
(URL encode of "?"), and the page loaded corrrectly.
But then I don't understand, how did kiwix-serve suggested me a link that my browser can't load (I had to replace ? with %3F
to load the page correctly)? Is there any problem with my zim file (I checked the digest!)? Or is it necessary for kiwix-serve to convert the link given by the zim file somehow?
I suspect that this issue boils down to the same root cause as in #587. It should be present in latest release (3.4.0) of kiwix-tools, too, but may be fixed by kiwix/libkiwix#859.
@DarkmatterUAE Could you please check if the bug is still there with latest nightly? https://download.kiwix.org/nightly/
No it isn't, the web interface changed a bit (probably due to version change) but I'm still getting the "page isn’t redirecting properly" error.
Using kiwix-tools_linux-i586-2022-12-17.tar.gz
libkiwix 12.0.0
+ libzim 8.1.0
+ libxapian 1.4.18
+ libcurl 7.67.0
+ libmicrohttpd 0.9.72
+ libz 1.2.12
+ libicu 58.2.0
+ libpugixml 0.12.0
libzim 8.1.0
+ libzstd 1.5.2
+ liblzma 5.2.6
+ libxapian 1.4.18
+ libicu 58.2.0
Well, I believe that kiwix/libkiwix#860 will fix this issue once it is merged.
Great, so lets wait and see that the PR is merged and a new nightly available for testing.
Nightly version kiwix-tools_linux-i586-2022-12-23.tar.gz
still didn't solve the issue. Is this expected? :thinking:
$./kiwix-serve -V
kiwix-tools 3.4.0
libkiwix 12.0.0
+ libzim 8.1.0
+ libxapian 1.4.18
+ libcurl 7.67.0
+ libmicrohttpd 0.9.72
+ libz 1.2.12
+ libicu 58.2.0
+ libpugixml 0.12.0
libzim 8.1.0
+ libzstd 1.5.2
+ liblzma 5.2.6
+ libxapian 1.4.18
+ libicu 58.2.0
@DarkmatterUAE It's not expected! @veloman-yunkan Do we have forgotten something?
I found a ZIM file containing an article with a question mark in its name on my side and reproduced the issue (which I lazily, stupidly and complacently hadn't done when writing my earlier comment https://github.com/kiwix/kiwix-tools/issues/589#issuecomment-1356279921). This time we deal with a set of bugs hiding deeper in the C++ code and addressed by kiwix/libkiwix#775. There is a quick workaround for suggestions, but a similar issue for search results will persist (which needs to be fixed in C++).
It still is not... Using 2023-01-07's nightly build.
kiwix-tools 3.4.0
libkiwix 12.0.0
+ libzim 8.1.0
+ libxapian 1.4.18
+ libcurl 7.67.0
+ libmicrohttpd 0.9.72
+ libz 1.2.12
+ libicu 58.2.0
+ libpugixml 0.12.0
libzim 8.1.0
+ libzstd 1.5.2
+ liblzma 5.2.6
+ libxapian 1.4.18
+ libicu 58.2.0
So it turns out that at the time of reporting this ticket was resting on a stack of several bugs. The remaining issue (I hope so) was already mentioned in my previous comment - it's kiwix/libkiwix#775. The reason why my last quick workaround didn't fully solve the issue is because of an extra redirection involved in this case:
A%2FQuo_Vadis%3F
(which is shown as A/Quo_Vadis?
on the third line in the network requests on the screenshot in the above comment)A/Quo_vadis?
(note the capitalization change in "vadis") which is not URI-encoded and leads to the infinite redirection loop because of the discarded question mark@veloman-yunkan So we should close this ticket as duplicate of kiwix/libkiwix#775? When this last ticket will be fixed/implemented, then the buggy behaviour reported here will vanish?
@kelson42 The buggy behaviour reported here should be eliminated by a rather small PR kiwix/libkiwix#866 though similar issues could be observed until kiwix/libkiwix#775 is fully fixed.
@veloman-yunkan Thank you for the fix and we shoukd focus now to fix kiwix/libkiwix#775.
Accessing wikipedia page "Quo Vadis?" in the suggestion (during search) resulted in Firefox reporting:
Reloading the page with dev tools opened resulted in a massive influx of accesses which received 302 but no actual responce body. https://upload.cc/i1/2022/12/16/rjJ9Vs.png Each time I did the testing kiwix-serve (-v) logs 21 repetition of these:
Tested on binaries distributed via download.kiwix.org and through alpine linux software repository: download.kiwix.org version:
alpine linux version: