wip test path cgi :
- _cgi_pos seems to be ok - construct url from return is not implemented yet + renamed script with extension .php and .cpp
This commit is contained in:
@@ -71,15 +71,18 @@ 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);
|
||||
if (pos != NPOS)
|
||||
{
|
||||
client->fill_script_path(path, pos);
|
||||
std::string script_output = _exec_cgi(client);
|
||||
_check_script_output(client, script_output);
|
||||
client->response += script_output;
|
||||
return;
|
||||
} */
|
||||
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);
|
||||
// std::string script_output = _exec_cgi(client);
|
||||
// _check_script_output(client, script_output);
|
||||
// client->response += script_output;
|
||||
// return;
|
||||
// }
|
||||
_process_method(client, path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user