mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
style: renames
This commit is contained in:
@@ -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<std::string, std::string>::iterator it;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class Header
|
||||
{
|
||||
private:
|
||||
HeaderHandl _request;
|
||||
HeaderHandl _respons;
|
||||
HeaderHandl _response;
|
||||
|
||||
private:
|
||||
int _row;
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
public:
|
||||
std::map<std::string , std::string> 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();
|
||||
|
||||
Reference in New Issue
Block a user