From 8efa97acccaabc80d5ba8319f59d02eff5ba6925 Mon Sep 17 00:00:00 2001 From: raptor Date: Sat, 21 Feb 2015 23:03:05 +0800 Subject: [PATCH] fix get_protocol bug. $_SERVER['HTTPS'] == '' on nginx http --- lib/pico.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pico.php b/lib/pico.php index 07a1481..d3150d1 100644 --- a/lib/pico.php +++ b/lib/pico.php @@ -309,7 +309,7 @@ class Pico { protected function get_protocol() { $protocol = 'http'; - if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){ + if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' && $_SERVER['HTTPS'] != ''){ $protocol = 'https'; } return $protocol;