mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「🔨」 fix: removed sus print
This commit is contained in:
@ -3,7 +3,7 @@ port = 5000
|
|||||||
host = "0.0.0.0"
|
host = "0.0.0.0"
|
||||||
|
|
||||||
[server.location./]
|
[server.location./]
|
||||||
root = "/home/adjoly/workspace/42/webserv/exemples/webpage"
|
root = "/home/adjoly/workspace/42/webserv/exemples"
|
||||||
cgi = { ".py"}
|
cgi = { ".py"}
|
||||||
methods = { "GET", "POST"}
|
methods = { "GET", "POST"}
|
||||||
[server.location./]
|
[server.location./asdf]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: gadelbes <gadelbes@student.42.fr> +#+ +:+ +#+ */
|
/* By: gadelbes <gadelbes@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/24 13:46:34 by gadelbes #+# #+# */
|
/* 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
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if (_is_post)
|
|
||||||
// ResourceManager::remove(_stdin_pipe[PIPE_WRITE]);
|
|
||||||
// FIX: whyyyyy
|
|
||||||
return str.str();
|
return str.str();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/30 09:42:18 by adjoly #+# #+# */
|
/* 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);
|
time_t now = std::time(NULL);
|
||||||
response.addHeader("Date", std::string(std::ctime(&now)));
|
response.addHeader("Date", std::string(std::ctime(&now)));
|
||||||
} catch (...) {
|
} 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.setProtocol(this->_protocol);
|
||||||
response.setStatusCode(404);
|
response.setStatusCode(404);
|
||||||
response.addHeader("Content-Type", "text/html");
|
response.addHeader("Content-Type", "text/html");
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */
|
/* 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));
|
http::Mime::getType(this->_target));
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// TODO: replace with a predefined array of error pages
|
|
||||||
response.setProtocol(this->_protocol);
|
response.setProtocol(this->_protocol);
|
||||||
response.setStatusCode(404);
|
response.setStatusCode(404);
|
||||||
response.addHeader("Content-Type", "text/html");
|
response.addHeader("Content-Type", "text/html");
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/05/27 18:22:48 by adjoly #+# #+# */
|
/* 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) {
|
void Server::_handle_resource(size_t i) {
|
||||||
struct pollfd pfd = PfdManager::at(i);
|
struct pollfd pfd = PfdManager::at(i);
|
||||||
AClientResource *res = ResourceManager::get(pfd.fd);
|
AClientResource *res = ResourceManager::get(pfd.fd);
|
||||||
if (res == not_nullptr) {
|
if (res == not_nullptr)
|
||||||
std::cout << "wtff" << std::endl;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!res->isProcessed() && res->isReady()) {
|
if (!res->isProcessed() && res->isReady()) {
|
||||||
res->process();
|
res->process();
|
||||||
|
Reference in New Issue
Block a user