From 91c237df6a65f6ec446eea4b89216ad53c9f7e0e Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 19 Sep 2022 13:28:30 -0600 Subject: Add abstractions to automatically unset environment variables The PATH_INFO environment variable has also been added. --- src/CGIScript.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/CGIScript.h') 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 #include +#include #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 m_environment_variables; }; -- cgit v1.2.3