summaryrefslogtreecommitdiffstats
path: root/source/HTTPServer/HTTPFormParser.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-05 23:08:16 +0200
committermadmaxoft <github@xoft.cz>2013-10-05 23:08:16 +0200
commitb5c90d7b20fede4e643e96417684c7c009d063cb (patch)
tree16729dacd792717ae4818dbe019b0fd02c58048a /source/HTTPServer/HTTPFormParser.cpp
parentFixed Base64Decode() returning wrong value. (diff)
downloadcuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.gz
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.bz2
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.lz
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.xz
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.zst
cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.zip
Diffstat (limited to 'source/HTTPServer/HTTPFormParser.cpp')
-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;
}