mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-07 12:59:45 +00:00
Rename CGIEnv to cgi::Env
This commit is contained in:
parent
fa33944919
commit
81cf36de22
7 changed files with 76 additions and 70 deletions
|
@ -12,43 +12,45 @@
|
|||
#include <boost/container/flat_map.hpp>
|
||||
|
||||
namespace tawashi {
|
||||
class CGIEnv {
|
||||
public:
|
||||
struct VersionInfo {
|
||||
boost::string_ref name;
|
||||
uint16_t major;
|
||||
uint16_t minor;
|
||||
namespace cgi {
|
||||
class Env {
|
||||
public:
|
||||
struct VersionInfo {
|
||||
boost::string_ref name;
|
||||
uint16_t major;
|
||||
uint16_t minor;
|
||||
};
|
||||
|
||||
typedef boost::container::flat_map<std::string, std::string> GetMapType;
|
||||
|
||||
Env();
|
||||
~Env() noexcept;
|
||||
|
||||
const std::string& auth_type() const;
|
||||
std::size_t content_length() const;
|
||||
const std::string& content_type() const;
|
||||
boost::optional<VersionInfo> gateway_interface() const a_pure;
|
||||
const std::string& path_info() const;
|
||||
const std::string& path_translated() const;
|
||||
const std::string& query_string() const;
|
||||
const std::string& remote_addr() const;
|
||||
const std::string& remote_host() const;
|
||||
const std::string& remote_ident() const;
|
||||
const std::string& remote_user() const;
|
||||
const std::string& request_method() const;
|
||||
const std::string& script_name() const;
|
||||
const std::string& server_name() const;
|
||||
uint16_t server_port() const a_pure;
|
||||
boost::optional<VersionInfo> server_protocol() const a_pure;
|
||||
const std::string& server_software() const;
|
||||
|
||||
GetMapType query_string_split() const a_pure;
|
||||
|
||||
std::ostream& print_all (std::ostream& parStream, const char* parNewline) const;
|
||||
|
||||
private:
|
||||
std::vector<std::string> m_cgi_env;
|
||||
CurlWrapper m_curl;
|
||||
};
|
||||
|
||||
typedef boost::container::flat_map<std::string, std::string> GetMapType;
|
||||
|
||||
CGIEnv();
|
||||
~CGIEnv() noexcept;
|
||||
|
||||
const std::string& auth_type() const;
|
||||
std::size_t content_length() const;
|
||||
const std::string& content_type() const;
|
||||
boost::optional<VersionInfo> gateway_interface() const a_pure;
|
||||
const std::string& path_info() const;
|
||||
const std::string& path_translated() const;
|
||||
const std::string& query_string() const;
|
||||
const std::string& remote_addr() const;
|
||||
const std::string& remote_host() const;
|
||||
const std::string& remote_ident() const;
|
||||
const std::string& remote_user() const;
|
||||
const std::string& request_method() const;
|
||||
const std::string& script_name() const;
|
||||
const std::string& server_name() const;
|
||||
uint16_t server_port() const a_pure;
|
||||
boost::optional<VersionInfo> server_protocol() const a_pure;
|
||||
const std::string& server_software() const;
|
||||
|
||||
GetMapType query_string_split() const a_pure;
|
||||
|
||||
std::ostream& print_all (std::ostream& parStream, const char* parNewline) const;
|
||||
|
||||
private:
|
||||
std::vector<std::string> m_cgi_env;
|
||||
CurlWrapper m_curl;
|
||||
};
|
||||
} //namespace cgi
|
||||
} //namespace tawashi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue