assign server and location to client in _read_request()

This commit is contained in:
LuckyLaszlo
2022-08-07 17:37:24 +02:00
parent 4ab099ee4d
commit 1ccf61bc68
5 changed files with 52 additions and 50 deletions

View File

@@ -7,6 +7,7 @@
# include <map>
# include <vector>
# include "utils.hpp"
# include "ServerConfig.hpp"
struct Request
{
@@ -26,13 +27,16 @@ class Client
//Client &operator=(Client const &rhs);
int fd;
const listen_socket *lsocket;
std::string raw_request;
std::string response;
unsigned int status;
listen_socket *lsocket;
bool header_complete;
size_t read_body_size;
ServerConfig *assigned_server; // cant be const cause of error_pages.operator[]
const LocationConfig *assigned_location;
// const functions ?
http_method get_method();