Proper URI-encoding in InternalServer::build_redirect()

- Before this change `InternalServer::build_redirect()` only URI-encoded the
  article path, ignoring the book name and/or the root location components of
  the URL.

- In order to be able to test this fix, corner_cases.zim was renamed to
  contain a couple of special URL symbols in its filename. The
  `create_corner_cases_zim_file` script was updated accordingly.
This commit is contained in:
Veloman Yunkan
2023-02-08 15:31:29 +01:00
parent 2f419996ab
commit 2e9bec95b0
7 changed files with 34 additions and 18 deletions

View File

@ -1517,7 +1517,7 @@ TEST(ServerSearchTest, searchInMultilanguageBookSetIsDenied)
const ZimFileServer::FilePathCollection ZIMFILES{
"./test/zimfile.zim", // eng
"./test/example.zim", // en
"./test/corner_cases.zim" // =en
"./test/corner_cases#&.zim" // =en
};
ZimFileServer zfs(SERVER_PORT, ZimFileServer::DEFAULT_OPTIONS, ZIMFILES);