wip parsing first line http message with new utils functions

This commit is contained in:
hugogogo
2022-08-10 20:27:48 +02:00
parent 9a379c835d
commit 11f71ea74f
5 changed files with 9 additions and 33 deletions

View File

@@ -10,29 +10,6 @@
- parse_http_body(std::string message)
*/
std::vector<std::string>
parse_http_first_line(std::string line)
{
std::vector<std::string> sline;
std::vector<std::string> line = "";
std::string sub;
std::string tmp;
size_t pos;
sline = ::split(line, ' ');
if (sline.size() == 3)
{
for (int i = 0; i < 3; i++)
{
tmp = sline[i];
tmp = ::trim(tmp, '\r');
tmp = ::trim(tmp, ' ');
line.push_back(tmp);
}
}
return line;
}
std::map<std::string, std::string>
parse_http_headers(std::string message)
{