You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
595 B

2 years ago
#pragma once
#include "webserv.hpp"
typedef std::map< string, std::vector< string > > request_t;
class Client {
int _fd;
Master *_parent;
string _header;
string _content;
request_t _request;
public:
Client(int fd, Master *parent);
~Client(void);
bool getRequest(string paquet);
bool parseHeader();
string header_pick(string key, int id);
void answer(Env *env);
bool check_method(Server *server, Route *route, string method);
void send_cgi(string cgi, string path);
void send_error(int error_code);
void send_answer(string msg);
2 years ago
friend class Master;
};