added multipart upload file,
it works, but need some adjustements, refactoring and testing
This commit is contained in:
@@ -153,7 +153,7 @@ std::string http_methods_to_str(unsigned int methods)
|
||||
|
||||
file_type eval_file_type(const std::string &path)
|
||||
{
|
||||
const char *tmp_path = path.c_str();
|
||||
const char *tmp_path = path.c_str(); // variable superflu ?
|
||||
struct stat s;
|
||||
|
||||
if (stat(tmp_path, &s) != -1)
|
||||
@@ -242,7 +242,7 @@ size_t
|
||||
std::vector<std::string> list;
|
||||
std::vector<std::string>::iterator it;
|
||||
std::vector<std::string>::iterator it_end;
|
||||
size_t err = 0;
|
||||
size_t err_count = 0;
|
||||
size_t pos;
|
||||
std::string key;
|
||||
std::string val;
|
||||
@@ -255,13 +255,13 @@ size_t
|
||||
pos = (*it).find(':');
|
||||
if (pos == NPOS)
|
||||
{
|
||||
err++;
|
||||
err_count++;
|
||||
continue;
|
||||
}
|
||||
key = (*it).substr(0, pos);
|
||||
if ( key.find(' ') != NPOS )
|
||||
{
|
||||
err++;
|
||||
err_count++;
|
||||
continue;
|
||||
}
|
||||
// bad idea, in cgi we need to have the original value
|
||||
@@ -270,7 +270,7 @@ size_t
|
||||
val = ::trim(val, ' ');
|
||||
fields.insert( std::pair<std::string, std::string>(key, val) );
|
||||
}
|
||||
return err;
|
||||
return err_count;
|
||||
}
|
||||
|
||||
void str_map_key_tolower(std::map<std::string, std::string> & mp)
|
||||
|
||||
Reference in New Issue
Block a user