bugfix invalid ptr in "ev.data.ptr" after vector<Client> resize/erase

+ persistent connections reintroduced
+ bugfix crash if invalid path in request
This commit is contained in:
LuckyLaszlo
2022-07-31 13:19:11 +02:00
parent af8dc072c1
commit ea3f3a390a
5 changed files with 54 additions and 22 deletions

View File

@@ -6,19 +6,19 @@
# include <string>
# include <map>
struct Client
class Client
{
// public:
public:
// Client(Placeholder);
// Client();
// Client(Client const &src);
// ~Client();
// Client &operator=(Client const &rhs);
// Client &operator=(int);
int fd;
std::string raw_request;
std::map<std::string, std::string> request;
// std::map<std::string, std::string> response;
std::string response;
unsigned int status;
@@ -26,4 +26,8 @@ struct Client
};
#endif
bool operator==(const Client& lhs, const Client& rhs);
bool operator==(const Client& lhs, int fd);
bool operator==(int fd, const Client& rhs);
#endif