Merge branch 'hugo2'

+ changed the appropriate getters for client
+ moved the functions to parse the http message
  (first line, headers, and body)
  outside client, in parsing_http_message.cpp
+ resolved some of the throw problems
This commit is contained in:
hugogogo
2022-08-09 15:54:40 +02:00
24 changed files with 205391 additions and 214 deletions

View File

@@ -7,6 +7,8 @@
# include <sstream>
# include <cstdlib> // atoi
# include <sys/stat.h> // stat()
# include <cctype> // tolower
# include <algorithm> // transform
# define CR "\r"
# define LF "\n"
@@ -41,6 +43,8 @@ http_method str_to_http_method(std::string &str);
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);
void throw_test();
std::string str_tolower(std::string str);
void del_line_in_str(std::string * str, size_t pos, std::string delim);
void throw_test();
#endif