mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Typo fix in HttpSocket
`schema` should be `scheme`, this fixes the only use of schema in HttpSocket. Fixes #2345 Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
495b7f279f
commit
be770bd9b8
1 changed files with 5 additions and 5 deletions
|
@ -296,17 +296,17 @@ class HttpSocket extends CakeSocket {
|
|||
if (!empty($this->request['cookies'])) {
|
||||
$cookies = $this->buildCookies($this->request['cookies']);
|
||||
}
|
||||
$schema = '';
|
||||
$scheme = '';
|
||||
$port = 0;
|
||||
if (isset($this->request['uri']['schema'])) {
|
||||
$schema = $this->request['uri']['schema'];
|
||||
if (isset($this->request['uri']['scheme'])) {
|
||||
$scheme = $this->request['uri']['scheme'];
|
||||
}
|
||||
if (isset($this->request['uri']['port'])) {
|
||||
$port = $this->request['uri']['port'];
|
||||
}
|
||||
if (
|
||||
($schema === 'http' && $port != 80) ||
|
||||
($schema === 'https' && $port != 443) ||
|
||||
($scheme === 'http' && $port != 80) ||
|
||||
($scheme === 'https' && $port != 443) ||
|
||||
($port != 80 && $port != 443)
|
||||
) {
|
||||
$Host .= ':' . $port;
|
||||
|
|
Loading…
Reference in a new issue