Browse Source

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>
euromark 14 years ago
parent
commit
be770bd9b8
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lib/Cake/Network/Http/HttpSocket.php

+ 5 - 5
lib/Cake/Network/Http/HttpSocket.php

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