Skip to content

Commit b380fdd

Browse files
Jannik Zschieschefabpot
Jannik Zschiesche
authored andcommitted
[HttpFoundation] Fixed isSecure() check to be compliant with the docs
1 parent c6c9f2a commit b380fdd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Request.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,9 @@ public function isSecure()
11001100
return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1'));
11011101
}
11021102

1103-
return 'on' == strtolower($this->server->get('HTTPS')) || 1 == $this->server->get('HTTPS');
1103+
$https = $this->server->get('HTTPS');
1104+
1105+
return !empty($https) && 'off' !== strtolower($https);
11041106
}
11051107

11061108
/**

0 commit comments

Comments
 (0)