diff --git a/webserv/config/AConfig.hpp b/webserv/config/AConfig.hpp index 08ad6fc..c9393e5 100644 --- a/webserv/config/AConfig.hpp +++ b/webserv/config/AConfig.hpp @@ -19,7 +19,7 @@ class AConfig AConfig &operator=(AConfig &&other) noexcept = delete; virtual ~AConfig() = default; - [[nodiscard]] virtual std::string getName() const = 0; + // [[nodiscard]] virtual std::string getName() const = 0; [[nodiscard]] virtual std::string getType() const = 0; void addDirective(const std::string &line); [[nodiscard]] std::string getErrorPage(int statusCode) const; diff --git a/webserv/config/GlobalConfig.cpp b/webserv/config/GlobalConfig.cpp index 51cb2dc..acf34a3 100644 --- a/webserv/config/GlobalConfig.cpp +++ b/webserv/config/GlobalConfig.cpp @@ -13,10 +13,10 @@ GlobalConfig::GlobalConfig(const std::string &block) parseBlock(block); } -std::string GlobalConfig::getName() const -{ - return "global"; -} +// std::string GlobalConfig::getName() const +// { +// return "global"; +// } std::string GlobalConfig::getType() const { diff --git a/webserv/config/GlobalConfig.hpp b/webserv/config/GlobalConfig.hpp index 530130e..73099a9 100644 --- a/webserv/config/GlobalConfig.hpp +++ b/webserv/config/GlobalConfig.hpp @@ -20,7 +20,7 @@ class GlobalConfig : public AConfig ~GlobalConfig() override = default; - [[nodiscard]] std::string getName() const override; + // [[nodiscard]] std::string getName() const override; [[nodiscard]] std::string getType() const override; [[nodiscard]] std::vector getServerConfigs() const; diff --git a/webserv/config/LocationConfig.cpp b/webserv/config/LocationConfig.cpp index 1648ac0..dad7df2 100644 --- a/webserv/config/LocationConfig.cpp +++ b/webserv/config/LocationConfig.cpp @@ -8,11 +8,11 @@ LocationConfig::LocationConfig(const std::string &block, const std::string &path parseBlock(block); } -std::string LocationConfig::getName() const -{ - auto parentName = parent_ != nullptr ? parent_->getName() : "root"; - return parentName + ", location: " + _path; -} +// std::string LocationConfig::getName() const +// { +// auto parentName = parent_ != nullptr ? parent_->getName() : "root"; +// return parentName + ", location: " + _path; +// } std::string LocationConfig::getType() const { diff --git a/webserv/config/LocationConfig.hpp b/webserv/config/LocationConfig.hpp index 314366b..693d3be 100644 --- a/webserv/config/LocationConfig.hpp +++ b/webserv/config/LocationConfig.hpp @@ -17,7 +17,7 @@ class LocationConfig : public AConfig ~LocationConfig() override = default; - [[nodiscard]] std::string getName() const override; + // [[nodiscard]] std::string getName() const override; [[nodiscard]] std::string getType() const override; [[nodiscard]] const std::string &getPath() const noexcept { return _path; } diff --git a/webserv/config/ServerConfig.cpp b/webserv/config/ServerConfig.cpp index 8c04ea6..e91a79c 100644 --- a/webserv/config/ServerConfig.cpp +++ b/webserv/config/ServerConfig.cpp @@ -16,11 +16,11 @@ ServerConfig::ServerConfig(const std::string &block, const AConfig *parent) : AC parseBlock(block); } -std::string ServerConfig::getName() const -{ - return "server: " + get("server_name").value_or("unnamed") + " (port " - + std::to_string(get("listen").value_or(-1)) + ")"; -} +// std::string ServerConfig::getName() const +// { +// return "server: " + get("server_name").value_or("unnamed") + " (port " +// + std::to_string(get("listen").value_or(-1)) + ")"; +// } std::string ServerConfig::getType() const { diff --git a/webserv/config/ServerConfig.hpp b/webserv/config/ServerConfig.hpp index 2f5f1d2..73e97e1 100644 --- a/webserv/config/ServerConfig.hpp +++ b/webserv/config/ServerConfig.hpp @@ -21,7 +21,7 @@ class ServerConfig : public AConfig ~ServerConfig() override = default; - [[nodiscard]] std::string getName() const override; + // [[nodiscard]] std::string getName() const override; [[nodiscard]] std::string getType() const override; [[nodiscard]] const LocationConfig *getLocation(const std::string &path) const;