debug new request parsing

This commit is contained in:
hugogogo
2022-08-11 14:50:56 +02:00
parent 27b4f96618
commit ff77dfd298
6 changed files with 58 additions and 24 deletions

View File

@@ -137,8 +137,13 @@ std::string Webserv::_exec_script(Client *client, char **env)
void Webserv::_check_script_output(Client *client, std::string output)
{
// TODO: it doesn't work with execve error, i don't know why yet ?
// DEBUG
std::cout << "outpu:__________\n" << output << "__________\n"
<< "\nstatus:" << client->status << "__________\n";
_check_script_status(client, output);
// DEBUG
std::cout << "outpu:__________\n" << output << "__________\n"
<< "\nstatus:" << client->status << "__________\n";
_check_script_fields(client, output);
}
@@ -166,8 +171,8 @@ void Webserv::_check_script_fields(Client *client, std::string output)
std::map<std::string, std::string>::iterator it_scr;
size_t pos;
srv_fld = ::parse_http_headers(client->response);
scr_fld = ::parse_http_headers(output);
::parse_http_headers(client->response, srv_fld);
::parse_http_headers(output, scr_fld);
// wip: compare both map to supress duplicates
for (it_srv = srv_fld.begin(); it_srv != srv_fld.end(); it_srv++)
{