changed client_body_limit (now in KB)

+ multiples little adjusts
This commit is contained in:
lperrey
2022-08-15 02:14:27 +02:00
parent 9ac84f706d
commit a284e400c1
12 changed files with 48 additions and 127 deletions

View File

@@ -14,8 +14,6 @@
# include <cstdlib> // strtol, stroul
# include <iostream> // cout, cin
# include <fstream> // ifstream
//# include <unistd.h> // access()
# include <dirent.h> // opendir(), doesn't work...
# include <sys/stat.h> // stat(), replaces opendir() don't bother with ERRNO ?
# include <algorithm> // sort() in Post
@@ -23,21 +21,17 @@ class ConfigParser {
public:
// canonical?
ConfigParser(const char* path); // a string?
ConfigParser();
~ConfigParser();
ConfigParser(const std::string &config_file);
// ideally i wouldn't have one cuz it makes no sense, when would i use it?
// ConfigParser & operator=(const ConfigParser& rhs);
void read_config(const std::string &config_file);
std::vector<ServerConfig> * parse(); // const?
// std::vector<ServerConfig> parse(); // const?
// i thought if it were an instance of this class you could call
// private member functions from anywhere...
void _print_content() const;
// private member functions from anywhere... // QUESTION : Wut ?
void print_content() const;
private:
@@ -45,25 +39,22 @@ private:
// explicit?
// what exaclty does explicit do again?
ConfigParser(); // might need a path as arg?
// ConfigParser();
// should this be in private since it always needs a path?
ServerConfig _parse_server(size_t *start);
LocationConfig _parse_location(size_t *start);
void _set_server_values(ServerConfig *server, const std::string key, std::string value);
void _set_location_values(LocationConfig *location, const std::string key, std::string value);
std::string _pre_set_val_check(const std::string key, \
const std::string value);
std::string _get_first_word(size_t *curr); // const?
std::string _get_rest_of_line(size_t *curr); // const?
/* Post Processing */
void _post_processing(std::vector<ServerConfig> *servers);
bool _find_root_path_location(std::vector<LocationConfig> locations); // const?