request parser speed improvements and test updates
Some checks failed
Docker Build & Publish / build (push) Failing after 2s

This commit is contained in:
Nicholas Orlowsky 2025-02-05 09:07:21 -05:00
parent 95430a5dc3
commit f930792a11
Signed by: nickorlow
GPG key ID: 838827D8C4611687
5 changed files with 127 additions and 78 deletions

View file

@ -24,13 +24,13 @@ private:
std::string _path;
std::string _client_ipaddr;
std::string _body_content;
std::unordered_map<std::string, header> _headers; // kinda goofy, whatever
std::unordered_map<std::string, query_param> _query_params; // kinda goofy, whatever
//
void parse_request_line(std::string& raw_line);
void parse_header(char* raw_line);
std::unordered_map<std::string, std::string> _headers;
std::unordered_map<std::string, std::string> _query_params;
void parse_request_line(char* raw_line);
void parse_header(std::string& raw_line);
void parse_path(char* raw_path);
void parse_query_param(char* raw_param);
void parse_query_param(std::string& raw_param);
public:
request(std::string& raw_data, const std::string& client_ip);