a few small fixes here and there, more telnet tests, starting Siege load testing
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user