1
0
Fork 0

[uri] Encode only bytes with highest bit set. Refs #226

It is not good, but before it was worse.
Characters like ? and = were encoded.
This commit is contained in:
Witold Filipczyk 2023-04-27 14:28:19 +02:00
parent b3402e7224
commit dc37be3b60
1 changed files with 1 additions and 1 deletions

View File

@ -1434,7 +1434,7 @@ encode_uri_string_percent(struct string *string, const char *name, int namelen)
if (namelen < 0) namelen = strlen(name);
for (end = name + namelen; name < end; name++) {
if (safe_char(*name) || (*name == '/') || (*name == '%')) {
if ((unsigned char)(*name) < 128) {
add_char_to_string(string, *name);
} else {
/* Hex it. */