wip cgi handling, client contains it's own privates functions to handle request headers and body
This commit is contained in:
@@ -76,9 +76,9 @@ class Webserv
|
||||
|
||||
private:
|
||||
int _epfd;
|
||||
std::vector<int> _listen_sockets;
|
||||
std::vector<int> _listen_sockets;
|
||||
std::vector<ServerConfig> _servers;
|
||||
std::vector<Client> _clients;
|
||||
std::vector<Client> _clients;
|
||||
|
||||
// accept.cpp
|
||||
void _accept_connection(int fd);
|
||||
@@ -91,6 +91,13 @@ class Webserv
|
||||
void _construct_response(Client *client);
|
||||
void _insert_status_line(Client *client);
|
||||
void _get_ressource(Client *client);
|
||||
// cgi_script.cpp
|
||||
bool _is_cgi(Client *client);
|
||||
void _exec_cgi(Client *client);
|
||||
void _construct_client(Client *client);
|
||||
char** _set_env(Client *client);
|
||||
char* _dup_env(std::string var, std::string val);
|
||||
void _exec_script(Client *client, char **env);
|
||||
// epoll_update.cpp
|
||||
int _epoll_update(int fd, uint32_t events, int op);
|
||||
int _epoll_update(int fd, uint32_t events, int op, void *ptr);
|
||||
@@ -102,18 +109,6 @@ class Webserv
|
||||
// init.cpp
|
||||
void _bind(int socket_fd, in_port_t port, std::string host);
|
||||
void _listen(int socket_fd, unsigned int max_connections);
|
||||
|
||||
// TMP HUGO TEST CGI
|
||||
//
|
||||
void _serve_file(Client *client, std::string page);
|
||||
void _exec_cgi_script(Client *client);
|
||||
void _parse_request(Client *client);
|
||||
void _parse_request_line(Client *client, std::string rline);
|
||||
void _parse_request_headers
|
||||
( Client *client
|
||||
, std::vector<std::string> list);
|
||||
//
|
||||
// END TMP HUGO TEST CGI
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user