mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-12 14:11:39 +00:00
Fix #817
This commit is contained in:
parent
eb2d28bca2
commit
60c2213893
@ -1463,9 +1463,10 @@ inline std::string encode_query_param(const std::string &value) {
|
|||||||
escaped.fill('0');
|
escaped.fill('0');
|
||||||
escaped << std::hex;
|
escaped << std::hex;
|
||||||
|
|
||||||
for (char const &c : value) {
|
for (auto c : value) {
|
||||||
if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '!' ||
|
if (std::isalnum(static_cast<uint8_t>(c)) || c == '-' || c == '_' ||
|
||||||
c == '~' || c == '*' || c == '\'' || c == '(' || c == ')') {
|
c == '.' || c == '!' || c == '~' || c == '*' || c == '\'' || c == '(' ||
|
||||||
|
c == ')') {
|
||||||
escaped << c;
|
escaped << c;
|
||||||
} else {
|
} else {
|
||||||
escaped << std::uppercase;
|
escaped << std::uppercase;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user