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

@@ -152,7 +152,7 @@ void Webserv::_check_script_status(Client *client, std::string output)
{
status_pos = pos + std::string("Status:").size();
client->status = atoi(output.c_str() + status_pos);
::del_line_in_str(&output, pos, CRLF);
::extract_line(output, pos, CRLF);
}
else
client->status = 200;
@@ -176,7 +176,7 @@ void Webserv::_check_script_fields(Client *client, std::string output)
if (it_srv->first == it_scr->first)
{
pos = client->response.find(it_srv->first);
::del_line_in_str(&client->response, pos, CRLF);
::extract_line(client->response, pos, CRLF);
}
}
}