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:
Me
2022-08-08 02:50:37 +02:00
parent cf69168a84
commit 9ee7205b95
13 changed files with 99 additions and 173 deletions

View File

@@ -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;
}