summaryrefslogtreecommitdiffstats
path: root/source/HTTPServer/HTTPFormParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/HTTPServer/HTTPFormParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/HTTPServer/HTTPFormParser.cpp b/source/HTTPServer/HTTPFormParser.cpp
index 85a789f7d..7db7b4e6d 100644
--- a/source/HTTPServer/HTTPFormParser.cpp
+++ b/source/HTTPServer/HTTPFormParser.cpp
@@ -32,7 +32,7 @@ cHTTPFormParser::cHTTPFormParser(cHTTPRequest & a_Request, cCallbacks & a_Callba
}
if ((a_Request.GetMethod() == "POST") || (a_Request.GetMethod() == "PUT"))
{
- if (a_Request.GetContentType() == "application/x-www-form-urlencoded")
+ if (strncmp(a_Request.GetContentType().c_str(), "application/x-www-form-urlencoded", 33) == 0)
{
m_Kind = fpkFormUrlEncoded;
return;
@@ -44,7 +44,8 @@ cHTTPFormParser::cHTTPFormParser(cHTTPRequest & a_Request, cCallbacks & a_Callba
return;
}
}
- ASSERT(!"Unhandled request method");
+ // Invalid method / content type combination, this is not a HTTP form
+ m_IsValid = false;
}