mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
refactor: made some functions static
This commit is contained in:
@@ -252,6 +252,8 @@ int Header::sendResponse(int fd)
|
||||
|
||||
//-------------------------------------------------Error---------------------------------------
|
||||
|
||||
std::map<std::string, std::string> Header::_errorCode;
|
||||
|
||||
void Header::initErrorCode(void)
|
||||
{
|
||||
_errorCode["100"] = "Continue";
|
||||
|
||||
@@ -21,20 +21,21 @@ private:
|
||||
|
||||
std::string _fileToSend;
|
||||
std::map<std::string, std::string> _headerField;
|
||||
std::map<std::string, std::string> _errorCode;
|
||||
|
||||
public:
|
||||
static std::map<std::string, std::string> _errorCode;
|
||||
|
||||
std::map<std::string , std::string> 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);
|
||||
|
||||
Reference in New Issue
Block a user