diff --git a/src/tawashi_implem/cgi_env.cpp b/src/tawashi_implem/cgi_env.cpp index eac8ace..101d5d9 100644 --- a/src/tawashi_implem/cgi_env.cpp +++ b/src/tawashi_implem/cgi_env.cpp @@ -166,7 +166,10 @@ namespace cgi { } bool Env::https() const { - return m_cgi_env[CGIVars::HTTPS] == "on"; + const std::string& val = m_cgi_env[CGIVars::HTTPS]; + return val.size() == 2 and ( + val == "on" or val == "ON" or val == "oN" or val == "On" + ); } uint16_t Env::server_port() const {