key fields headers in map are in lowercase

+ getters for this map are case insensitive
+ change request fiel 'path' for 'uri', 'query', and 'abs_path'
This commit is contained in:
hugogogo
2022-08-07 13:06:16 +02:00
parent 63ff42b57d
commit e0fd743b5b
7 changed files with 89 additions and 40 deletions

View File

@@ -3,7 +3,8 @@
bool Webserv::_is_cgi(Client *client)
{
if (client->get_rq_path().find("/cgi-bin/") != std::string::npos)
// TMP
if (client->get_rq_abs_path().find("/cgi-bin") != std::string::npos)
return true;
return false;
}
@@ -35,7 +36,7 @@ char** Webserv::_set_env(Client *client)
env[3] = _dup_env("GATEWAY_INTERFACE");
env[4] = _dup_env("PATH_INFO");
env[5] = _dup_env("PATH_TRANSLATED");
env[6] = _dup_env("QUERY_STRING");
env[6] = _dup_env("QUERY_STRING" , client->get_rq_query());
env[7] = _dup_env("REMOTE_ADDR" , client->get_cl_ip());
env[8] = _dup_env("REMOTE_HOST" , client->get_rq_headers("Host")); // just test
env[9] = _dup_env("REMOTE_IDENT"); // authentification not supported