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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user