fix: eof tester

This commit is contained in:
Talyx
2022-02-17 19:44:12 +03:00
parent e97df9c137
commit 87bc1cfc70
3 changed files with 3 additions and 1 deletions

View File

@@ -417,6 +417,8 @@ void Response::methodPost(void)
_body.erase(_body.begin(), _body.begin() + pos + 4); _body.erase(_body.begin(), _body.begin() + pos + 4);
} }
} }
else
_code = 204;
setHeaderBlocks(); setHeaderBlocks();
generateHeader(); generateHeader();
DBOUT << GREEN << "POST method called" << ENDL; DBOUT << GREEN << "POST method called" << ENDL;

View File

@@ -148,7 +148,7 @@ void Server::readSocket(Client &client, int fd)
int Server::delete_client(std::map<int,Client *> &client_map, int fd) int Server::delete_client(std::map<int,Client *> &client_map, int fd)
{ {
int ret; int ret;
client_map[fd]->printClientInfo(); // client_map[fd]->printClientInfo();
ret = epoll_ctl(_epoll_fd, EPOLL_CTL_DEL, fd, NULL); ret = epoll_ctl(_epoll_fd, EPOLL_CTL_DEL, fd, NULL);
close(fd); close(fd);
client_map[fd]->clear(); client_map[fd]->clear();

0
tester/index.html Normal file
View File