Closed rgaudin closed 2 years ago
This change assumes that
--urlRootLocation
must be specified as an absolute path (starting with/
). Omitting the leading/
will still work but the printed URL will be absolutely incorrect. Better just strip the leading/
(if any) fromrootLocation
.
You're right. I've copied the normalizeRootUrl
function from libkiwix (server.m_root
is private) so we can print a more reliable rootLocation… What do you think?
Usage mentions that the
rootLocation
defaults to/
while it was not. It defaulted to an empty string.While it defaulting to
""
or"/"
has no technical consequence: libkiwix's server normalizes the requested rootLocation ; it leads to users setting a"/"
-prefixed rootLocation when customizing it, resulting in double-slashed print of the URL to access kiwix-serve at.This harmonizes usage and actual default, fixing the URL print.