Merge pull request #101 from geraldolsribeiro/master

Encode space and plus characters
This commit is contained in:
yhirose 2018-10-30 21:42:11 +09:00 committed by GitHub
commit 74ec96e228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -934,7 +934,8 @@ inline std::string encode_url(const std::string& s)
for (auto i = 0; s[i]; i++) {
switch (s[i]) {
case ' ': result += "+"; break;
case ' ': result += "%20"; break;
case '+': result += "%2B"; break;
case '\'': result += "%27"; break;
case ',': result += "%2C"; break;
case ':': result += "%3A"; break;