DELETE method tested and fixed

+ added 404 for directories without index and autoindex
+ minors adjustements
This commit is contained in:
LuckyLaszlo
2022-08-15 18:16:11 +02:00
parent a284e400c1
commit 3fe37ea451
7 changed files with 62 additions and 64 deletions

View File

@@ -67,15 +67,15 @@ std::string trim(std::string str, char del);
http_method str_to_http_method(std::string &str);
std::string http_methods_to_str(unsigned int methods);
file_type eval_file_type(const std::string &path);
size_t eval_file_mode(std::string path, int mode);
size_t eval_file_mode(const std::string &path, int mode);
void replace_all_substr(std::string &str, const std::string &ori_substr, const std::string &new_substr);
std::string str_tolower(std::string str);
std::string extract_line(std::string & str, size_t pos = 0, std::string delim = "\n");
std::string get_line (std::string str, size_t pos = 0, std::string delim = "\n");
size_t parse_http_headers (std::string headers, std::map<std::string, std::string> & fields );
void str_map_key_tolower(std::map<std::string, std::string> & mp);
void throw_test();
// debug
void throw_test();
void print_special(std::string str);