wip parsing first line http message with new utils functions
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user