mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-14 21:30:17 +08:00
Update Response.php
$_SERVER['SERVER_PROTOCOL'] returns 'HTTP/1.0' or 'HTTP/1.1'
This commit is contained in:
@@ -242,7 +242,7 @@ class Response extends \yii\base\Response
|
|||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
if ($this->version === null) {
|
if ($this->version === null) {
|
||||||
if (isset($_SERVER['SERVER_PROTOCOL']) && $_SERVER['SERVER_PROTOCOL'] === '1.0') {
|
if (isset($_SERVER['SERVER_PROTOCOL']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.0') {
|
||||||
$this->version = '1.0';
|
$this->version = '1.0';
|
||||||
} else {
|
} else {
|
||||||
$this->version = '1.1';
|
$this->version = '1.1';
|
||||||
|
|||||||
Reference in New Issue
Block a user