Le merge / 20

This commit is contained in:
LuckyLaszlo
2022-08-14 06:30:27 +02:00
parent 84babec82b
commit ce0a004d28
15 changed files with 159 additions and 49 deletions

View File

@@ -73,19 +73,20 @@ void Webserv::_append_base_headers(Client *client)
client->response.append("Connection: keep-alive" CRLF);
}
// TODO HUGO : wip
void Webserv::_construct_response(Client *client)
{
std::string path = _replace_url_root(client, client->get_rq_abs_path());
std::string path;
std::string script_output;
/* size_t pos = _cgi_pos(client, path);
if (pos != NPOS)
path = _replace_url_root(client, client->get_rq_abs_path());
if (_is_cgi(client, path))
{
client->fill_script_path(path, pos);
std::string script_output = _exec_cgi(client);
script_output = _exec_cgi(client);
_check_script_output(client, script_output);
client->response += script_output;
return;
} */
}
_process_method(client, path);
}