Request类create方法改进,增加单元测试

This commit is contained in:
thinkphp
2016-09-05 15:40:46 +08:00
parent c23a0d6c89
commit 3e062ed3a7
2 changed files with 190 additions and 1 deletions

View File

@@ -240,7 +240,7 @@ class Request
$options['baseUrl'] = $info['path'];
$options['pathinfo'] = '/' == $info['path'] ? '/' : ltrim($info['path'], '/');
$options['method'] = $server['REQUEST_METHOD'];
$options['domain'] = $server['HTTP_HOST'];
$options['domain'] = $info['scheme'] . '://' . $server['HTTP_HOST'];
$options['content'] = $content;
self::$instance = new self($options);
return self::$instance;