1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-07 12:59:45 +00:00

Delete get_env, which confused me a lot.

Get raw environment variables directly from main().
Add code to split on '=' in cgi_environment_vars and only pick
the ones that are interesting, just as before.
This commit is contained in:
King_DuckZ 2017-05-08 19:46:14 +01:00
parent 376b34c1d0
commit 07135f215c
9 changed files with 60 additions and 98 deletions

View file

@ -19,9 +19,14 @@
#include "duckhandy/lexical_cast.hpp"
#include <cassert>
namespace {
const char* const g_dummy_env_list[] = { nullptr };
} //unnamed namespace
namespace tawashi {
namespace cgi {
FakeEnv::FakeEnv (std::string&& parVariablesIni) :
Env(g_dummy_env_list),
m_variables(std::move(parVariablesIni)),
m_auth_type(m_variables.parsed().at("fake_env").at("auth_type")),
m_content_type(m_variables.parsed().at("fake_env").at("content_type")),