fix get_protocol bug.

$_SERVER['HTTPS'] == '' on nginx http
This commit is contained in:
raptor 2015-02-21 23:03:05 +08:00
parent 234c295f69
commit 8efa97accc

View File

@ -309,7 +309,7 @@ class Pico {
protected function get_protocol() protected function get_protocol()
{ {
$protocol = 'http'; $protocol = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){ if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' && $_SERVER['HTTPS'] != ''){
$protocol = 'https'; $protocol = 'https';
} }
return $protocol; return $protocol;