Fixed big problem with CGI handling
+ remains somes minors problems
This commit is contained in:
@@ -44,15 +44,6 @@ void signal_handler(int signum);
|
||||
|
||||
# define MIME_TYPE_DEFAULT "application/octet-stream"
|
||||
|
||||
struct cgi_pipe_rfd
|
||||
{
|
||||
int fd;
|
||||
pid_t cgi_pid;
|
||||
Client *client;
|
||||
};
|
||||
bool operator==(const cgi_pipe_rfd& lhs, int fd);
|
||||
bool operator==(int fd, const cgi_pipe_rfd& rhs);
|
||||
|
||||
class Webserv
|
||||
{
|
||||
public:
|
||||
@@ -74,7 +65,6 @@ class Webserv
|
||||
private:
|
||||
int _epfd;
|
||||
std::vector<listen_socket> _listen_sockets;
|
||||
std::vector<cgi_pipe_rfd> _cgi_pipe_rfds;
|
||||
std::vector<ServerConfig> _servers;
|
||||
std::vector<Client> _clients;
|
||||
std::map<int, std::string> _http_status;
|
||||
@@ -147,9 +137,10 @@ class Webserv
|
||||
|
||||
|
||||
|
||||
void _read_cgi_output(cgi_pipe_rfd &cgi_fd);
|
||||
void _handle_epoll_error_cgi_fd(uint32_t events, std::vector<cgi_pipe_rfd>::iterator it);
|
||||
void _cgi_epollhup(uint32_t events, std::vector<cgi_pipe_rfd>::iterator it);
|
||||
Client *_find_cgi_fd(int cgi_fd);
|
||||
void _read_cgi_output(Client *client);
|
||||
void _handle_epoll_error_cgi_fd(uint32_t events, Client *client);
|
||||
void _cgi_epollhup(uint32_t events, Client *client);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user