mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 05:17:59 +03:00
refactor: made some functions static
This commit is contained in:
@@ -252,6 +252,8 @@ int Header::sendResponse(int fd)
|
|||||||
|
|
||||||
//-------------------------------------------------Error---------------------------------------
|
//-------------------------------------------------Error---------------------------------------
|
||||||
|
|
||||||
|
std::map<std::string, std::string> Header::_errorCode;
|
||||||
|
|
||||||
void Header::initErrorCode(void)
|
void Header::initErrorCode(void)
|
||||||
{
|
{
|
||||||
_errorCode["100"] = "Continue";
|
_errorCode["100"] = "Continue";
|
||||||
|
|||||||
@@ -21,20 +21,21 @@ private:
|
|||||||
|
|
||||||
std::string _fileToSend;
|
std::string _fileToSend;
|
||||||
std::map<std::string, std::string> _headerField;
|
std::map<std::string, std::string> _headerField;
|
||||||
std::map<std::string, std::string> _errorCode;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static std::map<std::string, std::string> _errorCode;
|
||||||
|
|
||||||
std::map<std::string , std::string> getHeaderField(void);
|
std::map<std::string , std::string> getHeaderField(void);
|
||||||
HeaderHandl getRequest(void);
|
HeaderHandl getRequest(void);
|
||||||
HeaderHandl getResponse(void);
|
HeaderHandl getResponse(void);
|
||||||
std::string getReasonPhrase(std::string);
|
static std::string getReasonPhrase(std::string);
|
||||||
std::string getReasonPhrase(int);
|
static std::string getReasonPhrase(int);
|
||||||
std::string getErrorPage(int code);
|
std::string getErrorPage(int code);
|
||||||
void setRawData(char *);
|
void setRawData(char *);
|
||||||
void setFd(int);
|
void setFd(int);
|
||||||
int getFd(void);
|
int getFd(void);
|
||||||
|
|
||||||
void initErrorCode(void);
|
static void initErrorCode(void);
|
||||||
int isFile(std::string);
|
int isFile(std::string);
|
||||||
int isDir(std::string);
|
int isDir(std::string);
|
||||||
void OpenResponseFile(const char *path);
|
void OpenResponseFile(const char *path);
|
||||||
|
|||||||
Reference in New Issue
Block a user