2#include "../includes/ServerConf.hpp"
12 : _serverName(other._serverName),
13 _interfacePortPair(other._interfacePortPair),
14 _maxBodySize(other._maxBodySize),
15 _locations(other._locations),
16 _errorPages(other._errorPages)
87 std::map<std::string, std::string>::const_iterator it =
_errorPages.find(errorCode);
size_t getMaxBodySize() const
std::string getErrorPagePath(const std::string &errorCode) const
Retrieves the path to a custom error page if one exists.
const struct sockaddr_in & getInterfacePortPair() const
void setInterfacePortPair(const struct sockaddr_in &address)
std::vector< LocationConf > _locations
struct sockaddr_in _interfacePortPair
void addErrorPage(const std::string &errorCode, const std::string &errorPagePath)
Adds a custom error page mapping (e.g., "404" -> "/errors/404.html").
std::map< std::string, std::string > _errorPages
void addLocation(const LocationConf &location)
Adds a parsed LocationConf block to this server.
const std::vector< LocationConf > & getLocations() const
void setServerName(const std::string &name)
const std::string & getServerName() const
void setMaxBodySize(size_t size)
const std::map< std::string, std::string > & getErrorPages() const
ServerConf & operator=(const ServerConf &other)