changed del_line_in_str to etract_line

This commit is contained in:
hugogogo
2022-08-10 17:12:28 +02:00
parent 17230ccc42
commit c7905ebd19
3 changed files with 21 additions and 8 deletions

View File

@@ -154,7 +154,8 @@ void Webserv::_check_script_status(Client *client, std::string output)
client->status = atoi(output.c_str() + status_pos);
::del_line_in_str(&output, pos, CRLF);
}
client->status = 200;
else
client->status = 200;
}
void Webserv::_check_script_fields(Client *client, std::string output)
@@ -165,8 +166,8 @@ void Webserv::_check_script_fields(Client *client, std::string output)
std::map<std::string, std::string>::iterator it_scr;
size_t pos;
srv_fld = parse_http_headers(client->response);
scr_fld = parse_http_headers(output);
srv_fld = ::parse_http_headers(client->response);
scr_fld = ::parse_http_headers(output);
// wip: compare both map to supress duplicates
for (it_srv = srv_fld.begin(); it_srv != srv_fld.end(); it_srv++)
{