diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index 97d0bad2..f77b4fcb 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -651,7 +651,8 @@ class Typecho_Request */ public function isSecure() { - return (isset($_SERVER['HTTPS']) && 'off' != $_SERVER['HTTPS']) || (isset($_SERVER['SERVER_PORT']) && 443 == $_SERVER['SERVER_PORT']); + return (!empty($_SERVER['HTTPS']) && 'off' != strtolower($_SERVER['HTTPS'])) + || (!empty($_SERVER['SERVER_PORT']) && 443 == $_SERVER['SERVER_PORT']); } /**