cgi_ext, redirect and upload_repo now functional in config, fixed location picker, some cleanup

This commit is contained in:
Me
2022-08-09 02:37:28 +02:00
parent a44b9b493a
commit 97c90236b9
7 changed files with 79 additions and 47 deletions

View File

@@ -9,7 +9,7 @@ if path is a valid dir check if index is specified and serve that
if no index and autoindex, server that
if file, server that!
WHere does cgi fit in in all this ???
Where does cgi fit in in all this ???
*/
@@ -39,15 +39,12 @@ WHere does cgi fit in in all this ???
{
// std::cout << "found a valid index\n";
path.append(client->assigned_location->index[i]);
break ; // what if index and autoindex in a single location?
// does this completely fail?
// do this instead of break?
//_get_file(client, path);
_get_file(client, path);
return ;
}
}
if (client->assigned_location->autoindex == true)
{
// _autoindex(client, client->assigned_location, path);
_autoindex(client, path);
return ;
}
@@ -189,4 +186,4 @@ void Webserv::_autoindex(Client *client, std::string &path)
std::cout << "could not open dir\n";
return ;
}
}
}