This commit is contained in:
Me
2022-08-12 04:38:07 +02:00
parent ab0bc2c4c0
commit f7c0ff1a8a
11 changed files with 27 additions and 103 deletions

View File

@@ -1,7 +1,7 @@
#include "Webserv.hpp"
// TODO : path_is_valid() Macro for return value
// const?
void Webserv::_get(Client *client)
{
std::string path = client->get_rq_abs_path();
@@ -114,6 +114,7 @@ void Webserv::_get_file(Client *client, const std::string &path)
}
}
// const?
void Webserv::_autoindex(Client *client, std::string &path)
{
std::cout << "made it to _autoindex\n";
@@ -162,9 +163,8 @@ void Webserv::_autoindex(Client *client, std::string &path)
else
{
// in theory not possible cuz we already checked...
/* could not open directory */
// perror ("");
std::cout << "could not open dir\n";
std::cerr << "could not open dir\n";
// throw?
return ;
}
}