mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
exit on cgi error
This commit is contained in:
@@ -117,6 +117,7 @@ std::string CgiHandle::executeCgi()
|
|||||||
execve(_response.getCgiPass().c_str(), argv, env);
|
execve(_response.getCgiPass().c_str(), argv, env);
|
||||||
std::cerr << WARNING << getDebugTime() << FAIL << " Execve error." << ENDL;
|
std::cerr << WARNING << getDebugTime() << FAIL << " Execve error." << ENDL;
|
||||||
write(STDOUT_FILENO, "Status: 500\r\n\r\n", 15);
|
write(STDOUT_FILENO, "Status: 500\r\n\r\n", 15);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -191,4 +192,4 @@ void CgiHandle::initEnvVariables()
|
|||||||
|
|
||||||
CgiHandle::~CgiHandle()
|
CgiHandle::~CgiHandle()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user