autoindex is working, a few things to iron out be we well on our way

This commit is contained in:
Me
2022-08-07 22:25:24 +02:00
parent f777441edf
commit 94852babc6
7 changed files with 85 additions and 39 deletions

View File

@@ -88,11 +88,14 @@ std::string http_methods_to_str(unsigned int methods)
return (str);
}
# include <iostream>
// you could make this &path...
int path_is_valid(std::string path)
{
std::string i_path = path.substr(1);
const char *tmp_path = i_path.c_str();
// std::string i_path = path.substr(1);
// const char *tmp_path = i_path.c_str();
const char *tmp_path = path.c_str();
struct stat s;
if (stat(tmp_path, &s) == 0)