diff options
author | cflip <cflip@cflip.net> | 2022-09-19 13:28:30 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2022-09-19 13:28:30 -0600 |
commit | 91c237df6a65f6ec446eea4b89216ad53c9f7e0e (patch) | |
tree | 31f93c35b89c24139a8dd0db5a6a5ba45c59bc7b /src/CGIScript.h | |
parent | 66ccc52ee0f07adacd8aad823f2d0a30952c6f32 (diff) |
Add abstractions to automatically unset environment variables
The PATH_INFO environment variable has also been added.
Diffstat (limited to 'src/CGIScript.h')
-rw-r--r-- | src/CGIScript.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CGIScript.h b/src/CGIScript.h index 6e8e031..a64c55a 100644 --- a/src/CGIScript.h +++ b/src/CGIScript.h @@ -2,6 +2,7 @@ #include <cstdio> #include <string> +#include <vector> #include "HttpRequest.h" @@ -10,10 +11,13 @@ public: CGIScript(const std::string& path, const HttpRequest&); ~CGIScript(); + void set_environment(const char* key, const char* value); bool is_open() const { return m_is_open; } std::string read_output(); private: FILE* m_pipe; bool m_is_open{false}; + + std::vector<const char*> m_environment_variables; }; |