summaryrefslogtreecommitdiffstats
path: root/WebServer/WebServer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 10:12:54 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 10:12:54 +0100
commitbb49f0e021fb1fbefad44d944233fb1cf72c495c (patch)
treeebb0f2b40a3987eddf126c368237c0c60e4e6518 /WebServer/WebServer.cpp
parentFixed a sigsegv on *nix (cFile double-closing files) (diff)
downloadcuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar.gz
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar.bz2
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar.lz
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar.xz
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.tar.zst
cuberite-bb49f0e021fb1fbefad44d944233fb1cf72c495c.zip
Diffstat (limited to '')
-rw-r--r--WebServer/WebServer.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/WebServer/WebServer.cpp b/WebServer/WebServer.cpp
index 3a2b6fbef..aca585a88 100644
--- a/WebServer/WebServer.cpp
+++ b/WebServer/WebServer.cpp
@@ -49,25 +49,6 @@
webserver::request_func webserver::request_func_=0;
-static std::vector< std::string > StringSplit(std::string str, std::string delim)
-{
- std::vector< std::string > results;
- size_t cutAt;
- while( (cutAt = str.find_first_of(delim)) != str.npos )
- {
- if(cutAt > 0)
- {
- results.push_back(str.substr(0,cutAt));
- }
- str = str.substr(cutAt+1);
- }
- if(str.length() > 0)
- {
- results.push_back(str);
- }
- return results;
-}
-
static std::string EatLine( std::string& a_String )
{
std::string RetVal = "";
@@ -140,8 +121,7 @@ void ParseMultipartFormData( webserver::http_request& req, Socket* s)
static const std::string multipart_form_data = "multipart/form-data";
if(req.content_type_.substr(0, multipart_form_data.size()) == multipart_form_data) // Difficult data... :(
{
- typedef std::vector< std::string > StringVector;
- StringVector ContentTypeData = StringSplit( req.content_type_, "; " );
+ AStringVector ContentTypeData = StringSplit( req.content_type_, "; " );
std::string boundary;
// Find boundary
@@ -208,7 +188,7 @@ void ParseMultipartFormData( webserver::http_request& req, Socket* s)
static const std::string disp_filename = "filename=";
// Parse the disposition
- StringVector DispositionData = StringSplit( f_disposition, "; " );
+ AStringVector DispositionData = StringSplit( f_disposition, "; " );
for( unsigned int i = 0; i < DispositionData.size(); ++i )
{
if( DispositionData[i].substr(0, disp_name.size()) == disp_name )