diff --git a/src/Header/Header.cpp b/src/Header/Header.cpp index 15f7448..f099eef 100644 --- a/src/Header/Header.cpp +++ b/src/Header/Header.cpp @@ -252,6 +252,8 @@ int Header::sendResponse(int fd) //-------------------------------------------------Error--------------------------------------- +std::map Header::_errorCode; + void Header::initErrorCode(void) { _errorCode["100"] = "Continue"; diff --git a/src/Header/Header.hpp b/src/Header/Header.hpp index 3492911..bfaf6b1 100644 --- a/src/Header/Header.hpp +++ b/src/Header/Header.hpp @@ -21,20 +21,21 @@ private: std::string _fileToSend; std::map _headerField; - std::map _errorCode; public: + static std::map _errorCode; + std::map getHeaderField(void); HeaderHandl getRequest(void); HeaderHandl getResponse(void); - std::string getReasonPhrase(std::string); - std::string getReasonPhrase(int); + static std::string getReasonPhrase(std::string); + static std::string getReasonPhrase(int); std::string getErrorPage(int code); void setRawData(char *); void setFd(int); int getFd(void); - void initErrorCode(void); + static void initErrorCode(void); int isFile(std::string); int isDir(std::string); void OpenResponseFile(const char *path);