summaryrefslogtreecommitdiffstats
path: root/source/HTTPServer/HTTPFormParser.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-28 20:06:35 +0200
committermadmaxoft <github@xoft.cz>2013-09-28 20:06:35 +0200
commitb883a0b514f91e62dd0be4924e609b1bb0b53f4c (patch)
tree549338e3e654ac03db8b607b3ac17388ff259b29 /source/HTTPServer/HTTPFormParser.cpp
parentCreated basic cHTTPFormParser. (diff)
downloadcuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar.gz
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar.bz2
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar.lz
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar.xz
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.tar.zst
cuberite-b883a0b514f91e62dd0be4924e609b1bb0b53f4c.zip
Diffstat (limited to 'source/HTTPServer/HTTPFormParser.cpp')
-rw-r--r--source/HTTPServer/HTTPFormParser.cpp4
1 files changed, 2 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)