1#include "../includes/LocationConf.hpp"
8 _allowedMethods(other._allowedMethods),
9 _returnURL(other._returnURL),
10 _returnCode(other._returnCode),
11 _autoIndex(other._autoIndex),
12 _defaultPage(other._defaultPage),
13 _storageLocation(other._storageLocation),
14 _cgiInterpreters(other._cgiInterpreters)
111 std::map<std::string, std::string>::const_iterator it =
_cgiInterpreters.find(ext);
HTTPMethod
Represents the HTTP methods supported by the server as a bitmask.
A lightweight wrapper for a short bitmap to handle HTTP method validations securely.
bool isAllowed(HTTPMethod method) const
Checks if a specific HTTP method is permitted using bitwise AND.
void addMethod(HTTPMethod method)
Adds an HTTP method to the allowed bitmap using bitwise OR.
const std::string & getReturnURL() const
const std::string & getPath() const
std::string getCgiInterpreter(const std::string &ext) const
void setDefaultPage(const std::string &defaultPage)
const std::string & getStorageLocation() const
void addAllowedMethod(HTTPMethod method)
const std::string & getDefaultPage() const
const std::string & getRoot() const
void setAutoIndex(bool autoIndex)
void addCgiInterpreter(const std::string &ext, const std::string &interpreterPath)
const AllowedMethods & getAllowedMethods() const
void setReturnURL(const std::string &url)
bool isMethodAllowed(HTTPMethod method) const
Checks if a specific HTTP method is permitted in this location.
void setReturnCode(const std::string &code)
bool getAutoIndex() const
std::map< std::string, std::string > _cgiInterpreters
void setRoot(const std::string &root)
const std::string & getReturnCode() const
void setPath(const std::string &path)
void setStorageLocation(const std::string &storageLocation)
bool isCgiExtension(const std::string &ext) const
Checks if a given file extension should be handled by CGI.
LocationConf & operator=(const LocationConf &other)
std::string _storageLocation
AllowedMethods _allowedMethods