NPOS macro
This commit is contained in:
@@ -157,7 +157,7 @@ void Webserv::_check_script_status(Client *client, std::string & output)
|
||||
int status_pos;
|
||||
|
||||
pos = output.find("Status:");
|
||||
if (pos != std::string::npos)
|
||||
if (pos != NPOS)
|
||||
{
|
||||
status_pos = pos + std::string("Status:").size();
|
||||
client->status = std::strtoul(output.c_str() + status_pos, NULL, 10);
|
||||
@@ -179,13 +179,13 @@ void Webserv::_check_script_fields(Client *client, std::string & output)
|
||||
// put server headers in map
|
||||
tmp = client->response;
|
||||
pos = tmp.find(CRLF CRLF);
|
||||
if (pos != std::string::npos)
|
||||
if (pos != NPOS)
|
||||
tmp.erase(pos);
|
||||
::parse_http_headers(tmp, srv_fld);
|
||||
// put script headers in map
|
||||
tmp = output;
|
||||
pos = tmp.find(CRLF CRLF);
|
||||
if (pos != std::string::npos)
|
||||
if (pos != NPOS)
|
||||
tmp.erase(pos);
|
||||
::parse_http_headers(tmp, scr_fld);
|
||||
// compare both map to supress duplicates
|
||||
|
||||
Reference in New Issue
Block a user