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.
This commit is contained in:
Veloman Yunkan 2023-02-09 11:03:48 +01:00
parent c2fffacbbd
commit 51206f4037
1 changed files with 4 additions and 1 deletions

View File

@ -1321,8 +1321,11 @@ TEST_F(ServerTest, NonEndpointUrlsAreRedirectedToContentUrls)
// Make sure that URI-encoded query stays URI-encoded
"/encode?string=%23%25%26%2B%3D%3F",
// Bug: the + symbol (that replaces space) in the query gets URI-encoded
// There seems to be a bug in httplib client - the '+' symbols
// in query parameters are URI encoded. Therefore using %20 (a URI-encoded
// space) instead.
//"/route?from=current+location&to=girlfriend%238",
"/route?from=current%20location&to=girlfriend%238",
};
for ( const std::string& p : paths )