successful merge?

This commit is contained in:
Me
2022-08-08 15:25:16 +02:00
11 changed files with 334 additions and 247 deletions

View File

@@ -40,6 +40,8 @@ void signal_handler(int signum);
# define FAILURE -1
# define SUCCESS 1
# define MIME_TYPE_DEFAULT "application/octet-stream"
class Webserv
{
public:
@@ -73,16 +75,17 @@ class Webserv
void _read_request(Client *client);
// response.cpp
void _response(Client *client);
void _send_response(Client *client, ServerConfig &server);
void _send_response(Client *client);
void _append_base_headers(Client *client);
void _construct_response(Client *client, ServerConfig &server);
void _process_method(Client *client, ServerConfig &server, LocationConfig &location);
void _construct_response(Client *client);
void _process_method(Client *client);
void _insert_status_line(Client *client);
void _error_html_response(Client *client, ServerConfig &server);
void _append_body(Client *client, const char *body, size_t body_size, const std::string &file_extension = "");
void _error_html_response(Client *client);
void _append_body(Client *client, const std::string &body, const std::string &file_extension = "");
void _get(Client *client, ServerConfig &server, LocationConfig &location);
void _get(Client *client);
// void _get(Client *client, ServerConfig &server, LocationConfig &location);
// in progress
void _autoindex(Client *client, LocationConfig &location, std::string &path);
@@ -90,14 +93,15 @@ class Webserv
void _get_file(Client *client, const std::string &path);
void _post(Client *client, ServerConfig &server, LocationConfig &location);
void _post(Client *client);
void _post_file(Client *client, const std::string &path);
void _delete(Client *client, ServerConfig &server, LocationConfig &location);
void _delete(Client *client);
void _delete_file(Client *client, const std::string &path);
ServerConfig &_determine_process_server(Client *client);
LocationConfig &_determine_location(ServerConfig &server, std::string &path);
ServerConfig *_determine_process_server(Client *client); // cant be const cause of error_pages.operator[]
const LocationConfig *_determine_location(const ServerConfig &server, const std::string &path) const;
std::string _determine_file_extension(const std::string &path) const;
// cgi_script.cpp
bool _is_cgi(Client *client);
void _exec_cgi(Client *client);