http message parsin wip but really better

This commit is contained in:
hugogogo
2022-08-11 00:28:01 +02:00
parent 11f71ea74f
commit 1d67e6988d
8 changed files with 112 additions and 81 deletions

View File

@@ -45,7 +45,10 @@ std::string http_methods_to_str(unsigned int methods);
int path_is_valid(std::string path);
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, std::string delim);
std::string extract_line(std::string & s, size_t p, std::string d);
std::string get_line(std::string str, size_t pos, std::string del);
std::map<std::string, std::string>
parse_http_headers (std::string headers, std::map<std::string, std::string> fields );
void throw_test();
#endif