-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full URI-encoding of URLs returned by kiwix-serve #890
Commits on Feb 8, 2023
-
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.
Configuration menu - View commit details
-
Copy full SHA for 2e9bec9 - Browse repository at this point
Copy the full SHA 2e9bec9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58bb8b9 - Browse repository at this point
Copy the full SHA 58bb8b9View commit details -
URI-encoding when redirecting legacy URLs to /content
Testing of this functionality revealed that the query part containing + symbols (as replacement for spaces in the parameter values) isn't forwarded properly as the + symbols are URI-encoded (this is a bug on the part of the `RequestContext::get_query()` the result of which already contains URI-encoded +'s).
Configuration menu - View commit details
-
Copy full SHA for a807ce2 - Browse repository at this point
Copy the full SHA a807ce2View commit details -
Passing of unrooted URL into RequestContext()
This change doesn't make much sense on its own - the real goal is to prepare some ground for easier implementation of URI-encoding of the root location.
Configuration menu - View commit details
-
Copy full SHA for 71a66e0 - Browse repository at this point
Copy the full SHA 71a66e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c5e84b - Browse repository at this point
Copy the full SHA 2c5e84bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7fe419 - Browse repository at this point
Copy the full SHA a7fe419View commit details -
This silly optimization in fact helps to avoid a somewhat more serious waste of CPU cycles that would otherwise result in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 97f0314 - Browse repository at this point
Copy the full SHA 97f0314View commit details
Commits on Feb 9, 2023
-
URI-encoding of the root location part
Now the root location is URI-encoded too. In order to properly test this change the root location in the tests was changed from "/ROOT" to "/ROOT#?" (or "/ROOT%23%3F" in URI-encoded form), which is why this commit is so big.
Configuration menu - View commit details
-
Copy full SHA for 05a66ea - Browse repository at this point
Copy the full SHA 05a66eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 02f631f - Browse repository at this point
Copy the full SHA 02f631fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2fffac - Browse repository at this point
Copy the full SHA c2fffacView commit details -
fixup! URI-encoding when redirecting legacy URLs to /content
The alleged bug seems rather an issue with httplib which seems to URI-encode any + present in query parameters.
Configuration menu - View commit details
-
Copy full SHA for 51206f4 - Browse repository at this point
Copy the full SHA 51206f4View commit details