summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-09 14:30:16 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-09 14:30:16 +0200
commit2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7 (patch)
treeb60f61cab1980dd9c3fbfd5aab8e12c9c5d1d98f
parentItemToString() now recognizes matches that are in the ini without metadata. (diff)
downloadcuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar.gz
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar.bz2
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar.lz
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar.xz
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.tar.zst
cuberite-2132599cbb83745ee9bc5edb0f0c9a3d5a70f2f7.zip
-rw-r--r--WebServer/WebServer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/WebServer/WebServer.cpp b/WebServer/WebServer.cpp
index c096dcd1d..c0331dc28 100644
--- a/WebServer/WebServer.cpp
+++ b/WebServer/WebServer.cpp
@@ -348,8 +348,9 @@ void* webserver::Request(void* ptr_s)
if( (req.method_.compare("POST") == 0) && (req.content_length_ > 0) )
{
+ const char FormUrlEncoded[] = "application/x-www-form-urlencoded";
// The only content type we can parse at the moment, the default HTML post data
- if( req.content_type_.compare( "application/x-www-form-urlencoded" ) == 0 )
+ if( req.content_type_.substr(0, strlen(FormUrlEncoded)).compare( FormUrlEncoded ) == 0 )
{
std::string Content = s->ReceiveBytes( req.content_length_ );
Content.insert( 0, "/ ?" ); // Little hack, inserts dummy URL so that SplitGetReq() can work with this content