mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +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:
parent
376b34c1d0
commit
07135f215c
9 changed files with 60 additions and 98 deletions
|
@ -74,7 +74,7 @@ namespace {
|
|||
}
|
||||
} //unnamed namespace
|
||||
|
||||
int main() {
|
||||
int main (int parArgc, char* parArgv[], char* parEnvp[]) {
|
||||
using curry::SafeStackObject;
|
||||
using tawashi::IndexResponse;
|
||||
using tawashi::SubmitPasteResponse;
|
||||
|
@ -101,7 +101,7 @@ int main() {
|
|||
spdlog::set_level(static_cast<decltype(spdlog::level::trace)>(logging_level._to_integral()));
|
||||
}
|
||||
|
||||
auto cgi_env = SafeStackObject<tawashi::cgi::Env>();
|
||||
auto cgi_env = SafeStackObject<tawashi::cgi::Env>(parEnvp);
|
||||
tawashi::ResponseFactory resp_factory(settings, cgi_env);
|
||||
SPDLOG_TRACE(statuslog, "Registering makers in the response factory");
|
||||
resp_factory.register_maker("index.cgi", &make_response<IndexResponse>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue