Bugfix: "forcedefault" would be treated as "default".
the build was successful Details

This commit is contained in:
tastytea 2019-02-28 18:54:50 +01:00
parent 00a29894e9
commit 3f32e4ff51
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 5 additions and 1 deletions

View File

@ -106,7 +106,11 @@ const Request http::parse_request(const string &request)
const string http::get_parameter(const string &request, const string &parameter)
{
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());