mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-11 22:58:47 +02:00
「🔨」 fix: fixed compilation error
This commit is contained in:
@ -6,14 +6,14 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/14 12:53:54 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 11:11:26 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/22 14:31:34 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "webserv.hpp"
|
||||
#include "cppeleven.hpp"
|
||||
#include "node/ANode.hpp"
|
||||
#include <config/default.hpp>
|
||||
#include <webserv.hpp>
|
||||
|
||||
using namespace webserv::config;
|
||||
|
||||
|
@ -6,10 +6,11 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/24 15:10:07 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 12:38:59 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/22 14:26:00 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <webserv.hpp>
|
||||
#include <config/default.hpp>
|
||||
|
||||
using namespace webserv::config;
|
||||
@ -106,3 +107,21 @@ Server::_parseErrPages(std::map<std::string, toml::ANode *> *table) {
|
||||
}
|
||||
return errPages;
|
||||
}
|
||||
|
||||
bool Server::isServerName(const std::string &server_name) {
|
||||
for (auto it = prange(_server_names)) {
|
||||
if (*it == server_name) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Route *Server::whatRoute(const URL &url) {
|
||||
for (auto it = prange(_routes)) {
|
||||
if (it->first == url) {
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
return not_nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user