🔨」 fix: fixed some things.

This commit is contained in:
adjoly
2025-06-23 21:26:29 +02:00
parent 457e05e8e5
commit 765dcdfb38
5 changed files with 7 additions and 8 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/13 18:14:45 by adjoly #+# #+# */
/* Updated: 2025/05/30 16:16:28 by adjoly ### ########.fr */
/* Updated: 2025/06/23 21:25:26 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -34,7 +34,6 @@ class CgiIn : public AClientResource {
~CgiIn(void) { log("", "CgiIn", "destructor called"); }
void process(void) {
std::cout << "processing cginin" << std::endl;
_processed = true;
ssize_t bytes_written = write(_fd, _body.c_str(), _body.size());
_log->debug("writting body : " + _body);

View File

@ -6,3 +6,4 @@ host = "0.0.0.0"
root = "/home/adjoly/workspace/42/webserv/exemples/webpage"
cgi = { ".py"}
methods = { "GET", "POST"}
[server.location./]

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */
/* Updated: 2025/06/23 21:16:06 by adjoly ### ########.fr */
/* Updated: 2025/06/23 21:26:10 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -76,7 +76,7 @@ void Get::parse(std::string const &data) {
}
if (_route->isCgi(targ)) {
_log->info("cgi added");
_log->debug("cgi added");
try {
_cgi = new server::Cgi(this, _route);
} catch (std::exception &e) {

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/30 09:50:20 by adjoly #+# #+# */
/* Updated: 2025/06/23 21:21:10 by adjoly ### ########.fr */
/* Updated: 2025/06/23 21:25:57 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -70,7 +70,7 @@ void Post::parse(std::string const &data) {
}
if (_route->isCgi(targ)) {
_log->info("cgi added");
_log->debug("cgi added");
try {
_cgi = new server::Cgi(this, _route);
} catch (std::exception &e) {

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/27 18:22:48 by adjoly #+# #+# */
/* Updated: 2025/06/23 20:55:13 by adjoly ### ########.fr */
/* Updated: 2025/06/23 21:25:17 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -134,7 +134,6 @@ void Server::_handle_resource(size_t i) {
if (!res->isProcessed() && res->isReady()) {
res->process();
// if (res->type() == CGI) {
_log->info("processingggg");
// } else if (pfd.revents & res->event()) {
// res->process();
// _log->info("processingggg");