diff --git a/includes/config/Route.hpp b/includes/config/Route.hpp index 47a0b3d..5f9eebe 100644 --- a/includes/config/Route.hpp +++ b/includes/config/Route.hpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/03/19 14:59:41 by adjoly #+# #+# */ -/* Updated: 2025/06/09 18:35:35 by adjoly ### ########.fr */ +/* Updated: 2025/06/23 21:03:07 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,6 +39,8 @@ class Route { std::vector *getCgi(void) { return _cgi; } bool * getMethods(void) { return _methods; } bool isCgi(std::string target) { + if (target.find('.') == target.npos) + return false; std::string target_ext = target.substr(target.find('.')); if (_cgi == not_nullptr) return false; diff --git a/sample.toml b/sample.toml old mode 100644 new mode 100755 index 933dad8..919dd27 --- a/sample.toml +++ b/sample.toml @@ -1,6 +1,6 @@ [server] +port = 5000 host = "0.0.0.0" -port = 8090 [server.location./] -methods = {"GET" +root = "/home/adjoly/workspace/42/webserv/exemples/" diff --git a/src/requests_handling/requestImplementation/Get.cpp b/src/requests_handling/requestImplementation/Get.cpp index 9cd477d..50cb274 100644 --- a/src/requests_handling/requestImplementation/Get.cpp +++ b/src/requests_handling/requestImplementation/Get.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/30 09:40:16 by adjoly #+# #+# */ -/* Updated: 2025/06/17 19:07:39 by adjoly ### ########.fr */ +/* Updated: 2025/06/23 21:03:12 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ Get::Get(std::string &data, config::Server *srv) { } Get::~Get(void) { - if (_url != not_nullptr) + if (_url != not_nullptr) delete _url; } diff --git a/src/server/Client.cpp b/src/server/Client.cpp index fc433b8..b3b0db8 100644 --- a/src/server/Client.cpp +++ b/src/server/Client.cpp @@ -6,7 +6,7 @@ /* By: mmoussou setMethod("404"); return; diff --git a/src/server/ServerHandle.cpp b/src/server/ServerHandle.cpp index 54c6b14..4d80fae 100644 --- a/src/server/ServerHandle.cpp +++ b/src/server/ServerHandle.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/27 18:22:48 by adjoly #+# #+# */ -/* Updated: 2025/05/30 16:30:40 by adjoly ### ########.fr */ +/* Updated: 2025/06/23 20:55:13 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */