1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-11-23 00:33:44 +00:00

Case-insensitive check for HTTPS=on.

This commit is contained in:
King_DuckZ 2017-05-19 19:48:31 +01:00
parent adcfc75f97
commit d3319512f4

View file

@ -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 {