From 689f5d347c6fae5da107676d7e350c1754720b82 Mon Sep 17 00:00:00 2001 From: adjoly Date: Tue, 8 Jul 2025 15:48:09 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20fixed?= =?UTF-8?q?=20issue=20with=20non=20existing=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/requests_handling/Cgi.cpp | 4 ++-- src/requests_handling/requestImplementation/Get.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/requests_handling/Cgi.cpp b/src/requests_handling/Cgi.cpp index fc234dc..062cb04 100644 --- a/src/requests_handling/Cgi.cpp +++ b/src/requests_handling/Cgi.cpp @@ -6,7 +6,7 @@ /* By: gadelbes +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/24 13:46:34 by gadelbes #+# #+# */ -/* Updated: 2025/07/02 12:36:59 by adjoly ### ########.fr */ +/* Updated: 2025/07/08 15:45:20 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -76,7 +76,7 @@ void Cgi::_prep(void) { _pfd_event = POLLIN; if (access(_script_path.c_str(), X_OK)) throw std::runtime_error( - "script is not executable please run : chmod +x " + _script_path); + "script is not executable please run : chmod +x " + _script_path + ", or create the file"); } void Cgi::_initEnvp(void) { diff --git a/src/requests_handling/requestImplementation/Get.cpp b/src/requests_handling/requestImplementation/Get.cpp index f59e687..b95703e 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/07/02 13:02:24 by adjoly ### ########.fr */ +/* Updated: 2025/07/08 15:47:43 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -79,6 +79,7 @@ void Get::parse(std::string const &data) { _log->error(e.what()); _method = "500"; delete _url; + _url = not_nullptr; return; } server::ResourceManager::append(_cgi);