added multipart upload file,

it works, but need some adjustements,
refactoring and testing
This commit is contained in:
LuckyLaszlo
2022-08-14 06:25:06 +02:00
parent b0949615c8
commit 84babec82b
19 changed files with 398 additions and 86 deletions

View File

@@ -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)