merged and added colors to makefile
This commit is contained in:
@@ -19,9 +19,6 @@ void Webserv::_get(Client *client)
|
||||
if (_is_cgi(client))
|
||||
{
|
||||
script_output = _exec_cgi(client);
|
||||
// DEBUG
|
||||
std::cout << "\n____script_output____\n" << script_output << "\n_______________\n";
|
||||
// wip check output of script
|
||||
_check_script_output(client, script_output);
|
||||
client->response += script_output;
|
||||
return;
|
||||
@@ -30,14 +27,14 @@ void Webserv::_get(Client *client)
|
||||
// END TMP HUGO
|
||||
|
||||
// Index/Autoindex block
|
||||
if (path_is_valid(path) == IS_DIR)
|
||||
if (eval_file_type(path) == IS_DIR)
|
||||
{
|
||||
std::cout << "made it to Index/Autoindex\n";
|
||||
if (path[path.size() - 1] != '/')
|
||||
path.push_back('/');
|
||||
for (size_t i = 0; i < client->assigned_location->index.size(); i++)
|
||||
{
|
||||
if (path_is_valid(path + client->assigned_location->index[i]) == 2)
|
||||
if (eval_file_type(path + client->assigned_location->index[i]) == IS_FILE)
|
||||
{
|
||||
path.append(client->assigned_location->index[i]);
|
||||
_get_file(client, path);
|
||||
@@ -49,8 +46,6 @@ void Webserv::_get(Client *client)
|
||||
}
|
||||
else
|
||||
_get_file(client, path);
|
||||
|
||||
|
||||
}
|
||||
|
||||
# define MAX_FILESIZE 1000000 // (1Mo)
|
||||
|
||||
Reference in New Issue
Block a user