🔨」 fix: fixed issue with non existing file

This commit is contained in:
2025-07-08 15:48:09 +02:00
parent 886468e472
commit 689f5d347c
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
/* By: gadelbes <gadelbes@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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) {

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);