fixed pbm in extract_line : delete the line and the newline sequence character

+ fixed pbm n _cgi_pos : last return is npos, not pos
This commit is contained in:
hugogogo
2022-08-13 12:39:05 +02:00
parent f17bc9fa58
commit defb2ada61
4 changed files with 14 additions and 16 deletions

View File

@@ -71,10 +71,9 @@ void Webserv::_construct_response(Client *client)
{
std::string path = _replace_url_root(client, client->get_rq_abs_path());
size_t pos = _cgi_pos(client, path);
//debug
std::cout << "pos:" << pos << B_YELLOW << "\nfin debug _cgi_pos()\n\n" << RESET;
size_t pos = _cgi_pos(client, path); /*DEBUG*/ std::cout << "pos:" << pos << B_YELLOW << "\nfin debug _cgi_pos()\n\n" << RESET;
(void)pos;
// if (pos != NPOS)
// {
// client->fill_script_path(path, pos);