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:
euromark 2011-12-06 14:59:51 +01:00 committed by mark_story
parent 495b7f279f
commit be770bd9b8

View file

@ -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;