location picker works, needs to be tested more tho
This commit is contained in:
@@ -55,26 +55,16 @@ void ConfigParser::_post_processing(std::vector<ServerConfig> *servers)
|
||||
if (it_l->index.empty())
|
||||
it_l->index = it->index;
|
||||
|
||||
// same for redirect status i think
|
||||
// nothing to be done for cgi_ext, error_pages, redirect
|
||||
|
||||
// maybe do something for Cgi_ext?
|
||||
|
||||
// std::cout << "In Post, Root + Path: " << it_l->root + it_l->path << '\n';
|
||||
/* if (path_is_valid(it_l->root + it_l->path) == 0)
|
||||
{
|
||||
//either we throw or we erase
|
||||
throw std::invalid_argument("location path is invalid");
|
||||
}
|
||||
*/
|
||||
if (path_is_valid(it_l->root + it_l->path) == 1 \
|
||||
&& it_l->path[it_l->path.size() - 1] != '/')
|
||||
it_l->path.push_back('/');
|
||||
|
||||
|
||||
++it_l;
|
||||
}
|
||||
std::sort(it->locations.begin(), it->locations.end());
|
||||
// std::reverse(it->locations.begin(), it->locations.end());
|
||||
std::reverse(it->locations.begin(), it->locations.end());
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user