a few small fixes here and there, more telnet tests, starting Siege load testing

This commit is contained in:
Eric LAZO
2022-08-16 20:41:57 +02:00
parent ff443c80b1
commit 1b7d388231
17 changed files with 163 additions and 94 deletions

View File

@@ -50,14 +50,6 @@ void ConfigParser::_post_processing(std::vector<ServerConfig> *servers)
&& it_l->path.size() > 1)
it_l->path.erase(it_l->path.size() - 1);
std::vector<LocationConfig>::const_iterator tmp = it_l + 1;
while (tmp != it->locations.end())
{
if (it_l->path == tmp->path)
throw std::invalid_argument("Duplicate locations in config file");
++tmp;
}
if (it_l->root == "")
it_l->root = it->root;
@@ -71,6 +63,20 @@ void ConfigParser::_post_processing(std::vector<ServerConfig> *servers)
++it_l;
}
it_l = it->locations.begin();
while (it_l != it->locations.end())
{
std::vector<LocationConfig>::const_iterator tmp = it_l + 1;
while (tmp != it->locations.end())
{
if (it_l->path == tmp->path)
throw std::invalid_argument("Duplicate locations in config file");
++tmp;
}
++it_l;
}
std::sort(it->locations.begin(), it->locations.end());
std::reverse(it->locations.begin(), it->locations.end());