default and custom error pages response
+ refactoring in response.cpp (functions split) + added Client::clear() + added replace_all_substr() in utils.cpp
This commit is contained in:
@@ -76,3 +76,15 @@ void Webserv::_listen(int socket_fd, unsigned int max_connections)
|
||||
throw std::runtime_error("Socket listen");
|
||||
}
|
||||
}
|
||||
|
||||
void Webserv::_init_http_status_map()
|
||||
{
|
||||
_http_status[200] = S200;
|
||||
|
||||
_http_status[400] = S400;
|
||||
_http_status[404] = S404;
|
||||
_http_status[405] = S405;
|
||||
_http_status[413] = S413;
|
||||
|
||||
_http_status[500] = S500;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user