mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 13:27:59 +03:00
add Class Respons Request
This commit is contained in:
@@ -52,8 +52,8 @@ void Server::setNonblocking(int fd)
|
||||
void Server::newConnection(int fd)
|
||||
{
|
||||
struct epoll_event ev;
|
||||
ev.events = EPOLLIN | EPOLLOUT | EPOLLET;
|
||||
ev.data.fd = fd;
|
||||
ev.events = EPOLLIN | EPOLLOUT | EPOLLET;
|
||||
|
||||
epoll_ctl(_epolfd, EPOLL_CTL_ADD, fd, &ev);
|
||||
_client++;
|
||||
@@ -77,7 +77,6 @@ void Server::start(void)
|
||||
code = header.parseRequest();
|
||||
header.printHeaderInfo();
|
||||
header.sendRespons(fd_accept);
|
||||
std::cout << BLUE << header.getReasonPhrase(code) << ZERO_C << std::endl;
|
||||
close(fd_accept);
|
||||
close(serverSocket.getSocketFd());
|
||||
//-----------------------------------------------попытка добавить epoll------------------
|
||||
|
||||
@@ -255,7 +255,6 @@ void ServerConfig::fillFields(void)
|
||||
ret = identify(block);
|
||||
++block;
|
||||
}
|
||||
// printFields();
|
||||
}
|
||||
|
||||
void ServerConfig::printFields(void)
|
||||
@@ -291,14 +290,14 @@ void ServerConfig::printFields(void)
|
||||
}
|
||||
std::cout << std::endl;
|
||||
it3 = (*it).redirect.begin();
|
||||
std::cout << YELLOW << "redirection" << BLUE << " " << it3->first << " " << it3->second << std::endl;
|
||||
std::cout << YELLOW << "redirection" << RED << " " << it3->first << " " << BLUE << it3->second << std::endl;
|
||||
++it;
|
||||
std::cout << PINK << "------------------------------------------------\n";
|
||||
}
|
||||
std::cout << GREEN << "error pages" << std::endl;
|
||||
while (it1 != _errorPages.end())
|
||||
{
|
||||
std::cout << BLUE << it1->first << " " << it1->second << std::endl;
|
||||
std::cout << YELLOW << it1->first << " " << BLUE << it1->second << std::endl;
|
||||
++it1;
|
||||
}
|
||||
std::cout << RED << "-------------------------Server-End------------------------------------\n" << ZERO_C;
|
||||
|
||||
Reference in New Issue
Block a user