Index and Autoindex work nicely, standarized way paths for root and location path are stored in config, still needs a little polishing prolly
This commit is contained in:
@@ -57,7 +57,7 @@ void ConfigParser::_post_processing(std::vector<ServerConfig> *servers)
|
||||
|
||||
// same for redirect status i think
|
||||
|
||||
// maybe do something for Cgi_info?
|
||||
// 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)
|
||||
@@ -66,6 +66,10 @@ void ConfigParser::_post_processing(std::vector<ServerConfig> *servers)
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user