From a7a762320381097c1dad6e6e68cea55e72e8f787 Mon Sep 17 00:00:00 2001 From: joyqi Date: Tue, 10 Dec 2013 11:13:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BC=BA=E5=88=B6https?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Typecho/Request.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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']); } /**