From 3f32e4ff5188548a38f0cd37ea8015491ae42454 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 28 Feb 2019 18:54:50 +0100 Subject: [PATCH] Bugfix: "forcedefault" would be treated as "default". --- src/http.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/http.cpp b/src/http.cpp index 1bbf852..d49af55 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -106,7 +106,11 @@ const Request http::parse_request(const string &request) const string http::get_parameter(const string &request, const string ¶meter) { - std::size_t pos = request.find(parameter + "="); + std::size_t pos = request.find("&" + parameter + "="); + if (pos == std::string::npos) + { + pos = request.find("?" + parameter + "="); + } if (pos != std::string::npos) { pos += (1 + parameter.length());