From 4554f99451d333910f0d6ce2080e1ef9c02b7026 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 15 Oct 2016 11:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index d9286298..35803e3f 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -210,8 +210,6 @@ class Request unset($server['HTTPS']); $server['SERVER_PORT'] = 80; } - } else { - $info['scheme'] = 'http'; } if (isset($info['port'])) { $server['SERVER_PORT'] = $info['port']; @@ -250,7 +248,7 @@ class Request $options['baseUrl'] = $info['path']; $options['pathinfo'] = '/' == $info['path'] ? '/' : ltrim($info['path'], '/'); $options['method'] = $server['REQUEST_METHOD']; - $options['domain'] = $info['scheme'] . '://' . $server['HTTP_HOST']; + $options['domain'] = isset($info['scheme']) ? $info['scheme'] . '://' . $server['HTTP_HOST'] : ''; $options['content'] = $content; self::$instance = new self($options); return self::$instance;