Fixed big problem with CGI handling

+ remains somes minors problems
This commit is contained in:
lperrey
2022-08-17 01:11:20 +02:00
parent 4dc70373f8
commit ccc542f52b
9 changed files with 96 additions and 118 deletions

View File

@@ -50,7 +50,7 @@ int Webserv::_send_response(Client *client)
return SEND_IN_PROGRESS;
}
}
else if (client->cgi_pipe_rfd)
else if (!client->cgi_output.empty())
{
// /*DEBUG*/ std::cout << "\n" B_PURPLE "[response]:" RESET "\n"; ::print_special(client->response); std::cout << B_PURPLE "-----------" RESET "\n\n";
// /*DEBUG*/ std::cout << "\n" B_PURPLE "[script output]:" RESET "\n"; ::print_special(script_output); std::cout << B_PURPLE "-----------" RESET "\n\n";