From f5a04dd9d47413f6c792398c5a80708cac36b649 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Fri, 2 Oct 2015 19:35:22 +0200 Subject: [PATCH] Better urlencode compatibility --- minihttp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/minihttp.cpp b/minihttp.cpp index 2afba5b..21b9e5b 100644 --- a/minihttp.cpp +++ b/minihttp.cpp @@ -272,7 +272,8 @@ void URLEncode(const std::string& s, std::string& enc) { const unsigned char c = s[i]; // from https://www.ietf.org/rfc/rfc1738.txt, page 3 - if(isalnum(c) || c == '$' || c == '-' || c == '_' || c == '.' || c == '+' || c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' || c == ',') + // with some changes for compatibility + if(isalnum(c) || c == '-' || c == '_' || c == '.' || c == ',') enc += (char)c; else if(c == ' ') enc += '+';