autoindex in progress but need to check stuff on master branch

This commit is contained in:
Me
2022-08-07 20:37:53 +02:00
parent 4870b2c05d
commit f777441edf
9 changed files with 90 additions and 69 deletions

View File

@@ -38,12 +38,14 @@ public:
std::string path;
int client_body_limit;
std::string root;
std::vector<std::string> index;
unsigned int allow_methods;
std::map<std::string, std::string> cgi_info;
std::vector<std::string> cgi_ext; // php not .php
bool autoindex;
std::vector<std::string> upload_repo;
// wait if i can call several times, shouldn't it be a map?
// wait no there can only be 1 and i think it might have to be in
// location only...
@@ -57,7 +59,6 @@ public:
std::cout << "\nPRINTING A LOCATION\n";
std::cout << "Path: " << path << '\n';
std::cout << "client_body_limit: " << client_body_limit << '\n';
std::cout << "root: " << root << '\n';
std::cout << "Skipping index...\n";
@@ -100,13 +101,14 @@ public:
++comp_rhs;
// ok now we need to add a thing where we check for files vs folders
if (comp_lhs == comp_rhs)
/* if (comp_lhs == comp_rhs)
{
if (path_is_valid(root + path) == 2)
--comp_lhs;
if (path_is_valid(rhs.root + rhs.path) == 2)
--comp_rhs;
}
*/
// std::cout << "comp_lhs: " << comp_lhs << " comp_rhs: " << comp_rhs
// << " bool res: " << (comp_lhs > comp_rhs) << "\n";