浏览代码

fix get_protocol bug.

 $_SERVER['HTTPS'] == '' on nginx http
raptor 10 年之前
父节点
当前提交
8efa97accc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/pico.php

+ 1 - 1
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;