diff --git a/src/Header/Header.cpp b/src/Header/Header.cpp index 8322e4a..15f7448 100644 --- a/src/Header/Header.cpp +++ b/src/Header/Header.cpp @@ -47,9 +47,9 @@ HeaderHandl Header::getRequest(void) return (_request); } -HeaderHandl Header::getRespons(void) +HeaderHandl Header::getResponse(void) { - return (_respons); + return (_response); } int Header::getFd(void) @@ -196,7 +196,7 @@ int Header::isDir(std::string path) return (-1); } -void Header::OpenResponsFile(const char *path) +void Header::OpenResponseFile(const char *path) { std::stringstream ss; char buf[BUFFSIZE + 1] = {0}; @@ -233,7 +233,7 @@ int Header::sendHeader(int fd) return (0); } -int Header::sendRespons(int fd) +int Header::sendResponse(int fd) { std::string path; @@ -242,7 +242,7 @@ int Header::sendRespons(int fd) if (_ret == 200 && isDir(path) == 0) _fileToSend = Autoindex::getPage(_request._URI, _request._host); else if (_ret == 200) - OpenResponsFile(path.c_str()); + OpenResponseFile(path.c_str()); else _fileToSend = getErrorPage(_ret); send(fd, _fileToSend.c_str(), _fileToSend.length(), 0); @@ -319,7 +319,7 @@ std::string Header::getReasonPhrase(int code) //-------------------------------------------------Other--------------------------------------- -void Header::printHeaderInfo(void) +void Header::printInfo(void) { std::map::iterator it; diff --git a/src/Header/Header.hpp b/src/Header/Header.hpp index 6ea602b..3492911 100644 --- a/src/Header/Header.hpp +++ b/src/Header/Header.hpp @@ -9,7 +9,7 @@ class Header { private: HeaderHandl _request; - HeaderHandl _respons; + HeaderHandl _response; private: int _row; @@ -26,7 +26,7 @@ private: public: std::map getHeaderField(void); HeaderHandl getRequest(void); - HeaderHandl getRespons(void); + HeaderHandl getResponse(void); std::string getReasonPhrase(std::string); std::string getReasonPhrase(int); std::string getErrorPage(int code); @@ -37,15 +37,15 @@ public: void initErrorCode(void); int isFile(std::string); int isDir(std::string); - void OpenResponsFile(const char *path); + void OpenResponseFile(const char *path); int parseStartLine(std::string); void parseURI(std::string); int parseHeaderfield(std::string); - void printHeaderInfo(void); + void printInfo(void); int parseRequest(void); - int sendRespons(int fd); + int sendResponse(int fd); int sendHeader(int fd); void clear(void); Header();