🔨」 fix: removed sus print

This commit is contained in:
adjoly
2025-06-24 18:07:39 +02:00
parent 765dcdfb38
commit 560c87f152
5 changed files with 7 additions and 17 deletions

View File

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

View File

@ -6,7 +6,7 @@
/* By: gadelbes <gadelbes@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/24 13:46:34 by gadelbes #+# #+# */
/* Updated: 2025/05/30 16:13:54 by adjoly ### ########.fr */
/* Updated: 2025/06/24 18:02:34 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -186,8 +186,5 @@ std::string Cgi::str(void) {
} else
break;
}
// if (_is_post)
// ResourceManager::remove(_stdin_pipe[PIPE_WRITE]);
// FIX: whyyyyy
return str.str();
}

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/30 09:42:18 by adjoly #+# #+# */
/* Updated: 2025/05/28 11:29:55 by adjoly ### ########.fr */
/* Updated: 2025/06/24 18:02:42 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -83,10 +83,6 @@ Response Delete::execute(void) {
time_t now = std::time(NULL);
response.addHeader("Date", std::string(std::ctime(&now)));
} catch (...) {
// TODO: check errno value and get corresponding error page, check for
// corresponding error code :
// https://cdn.discordapp.com/attachments/784779058407014403/1350841524778307586/image.png?ex=67d8dd74&is=67d78bf4&hm=c030468d3862627d6402bf200960d1a15249ba2f8dac772af3283b368a77f2f5&
response.setProtocol(this->_protocol);
response.setStatusCode(404);
response.addHeader("Content-Type", "text/html");

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:26:10 by adjoly ### ########.fr */
/* Updated: 2025/06/24 18:02:19 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -264,7 +264,6 @@ body {\n\
http::Mime::getType(this->_target));
}
} catch (...) {
// TODO: replace with a predefined array of error pages
response.setProtocol(this->_protocol);
response.setStatusCode(404);
response.addHeader("Content-Type", "text/html");

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 21:25:17 by adjoly ### ########.fr */
/* Updated: 2025/06/24 18:02:10 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -126,10 +126,8 @@ void Server::_handle_client(size_t *i) {
void Server::_handle_resource(size_t i) {
struct pollfd pfd = PfdManager::at(i);
AClientResource *res = ResourceManager::get(pfd.fd);
if (res == not_nullptr) {
std::cout << "wtff" << std::endl;
if (res == not_nullptr)
return;
}
if (!res->isProcessed() && res->isReady()) {
res->process();