From 8a877027a1ac202740f3c276df777ccdc61b92aa Mon Sep 17 00:00:00 2001 From: woe Date: Thu, 27 Aug 2020 15:08:55 +0200 Subject: [PATCH] Handle "=" in URL query parameters (i.e. site.com?compare=1=2& --- utility.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utility.hpp b/utility.hpp index 2c0e7cf..b6420b2 100644 --- a/utility.hpp +++ b/utility.hpp @@ -145,7 +145,8 @@ namespace SimpleWeb { name_end_pos = std::string::npos; value_pos = std::string::npos; } - else if(query_string[c] == '=') { + else if(query_string[c] == '=' && + name_end_pos == std::string::npos) { name_end_pos = c; value_pos = c + 1; }