diff options
-rw-r--r-- | source/HTTPServer/HTTPFormParser.cpp | 4 | ||||
-rw-r--r-- | source/HTTPServer/HTTPServer.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/HTTPServer/HTTPFormParser.cpp b/source/HTTPServer/HTTPFormParser.cpp index 3412bcc94..6f6dc02b2 100644 --- a/source/HTTPServer/HTTPFormParser.cpp +++ b/source/HTTPServer/HTTPFormParser.cpp @@ -34,7 +34,7 @@ cHTTPFormParser::cHTTPFormParser(cHTTPRequest & a_Request) : m_Kind = fpkFormUrlEncoded; return; } - if (a_Request.GetContentType() == "multipart/form-data") + if (strncmp(a_Request.GetContentType().c_str(), "multipart/form-data", 19) == 0) { m_Kind = fpkMultipart; return; @@ -98,7 +98,7 @@ bool cHTTPFormParser::HasFormData(const cHTTPRequest & a_Request) { return ( (a_Request.GetContentType() == "application/x-www-form-urlencoded") || - (a_Request.GetContentType() == "multipart/form-data") || + (strncmp(a_Request.GetContentType().c_str(), "multipart/form-data", 19) == 0) || ( (a_Request.GetMethod() == "GET") && (a_Request.GetURL().find('?') != AString::npos) diff --git a/source/HTTPServer/HTTPServer.cpp b/source/HTTPServer/HTTPServer.cpp index 86fd545f6..ac21acb24 100644 --- a/source/HTTPServer/HTTPServer.cpp +++ b/source/HTTPServer/HTTPServer.cpp @@ -69,6 +69,7 @@ class cDebugCallbacks : Resp.SetContentType("text/plain"); a_Connection.Send(Resp); a_Connection.Send("Form parsing failed"); + return; } cHTTPResponse Resp; |