🏗️」 wip: started working on cgi finally

This commit is contained in:
2025-05-15 14:25:45 +02:00
parent 3300dcd057
commit 67cf7a1c3a
6 changed files with 94 additions and 29 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/11 16:11:40 by adjoly #+# #+# */
/* Updated: 2025/05/02 13:30:50 by mmoussou ### ########.fr */
/* Updated: 2025/05/14 23:58:55 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -187,14 +187,15 @@ void Server::_run(void) {
_log->error("client does not exist");
continue;
}
if (client->requestParsed() == true && !client->isReadyToClose()) {
if (client->requestParsed() == true &&
!client->isReadyToClose()) {
client->answer();
continue;
}
if (client->isReadyToClose()) {
_client_data.erase(std::find(_client_data.begin(),
_client_data.end(), client));
_client_data.end(), client));
delete client;
for (auto it = range(_client_fds)) {
if (_client_fds[i].fd == (*it).fd) {