Skip to content
Permalink
Browse files

Minor optimizations.

  • Loading branch information...
jrbasso committed Dec 6, 2010
1 parent d656bda commit 7c23d289e0945f0af53ef2e219ca5c4aa95c6aea
Showing with 4 additions and 5 deletions.
  1. +1 −1 cake/libs/http_socket.php
  2. +3 −4 cake/tests/cases/libs/http_socket.test.php
@@ -321,7 +321,7 @@ public function &request($request = array()) {
$response .= $data;
}
if ($connectionType == 'close') {
if ($connectionType === 'close') {
$this->disconnect();
}
@@ -251,13 +251,12 @@ public function testConstruct() {
$baseConfig['host'] = 'foo-bar';
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
$this->assertEquals($this->Socket->config, $baseConfig);
$this->Socket->reset();
$baseConfig = $this->Socket->config;
$this->Socket->__construct('http://www.cakephp.org:23/');
$baseConfig['host'] = 'www.cakephp.org';
$baseConfig['request']['uri']['host'] = 'www.cakephp.org';
$baseConfig['port'] = 23;
$baseConfig['request']['uri']['port'] = 23;
$baseConfig['host'] = $baseConfig['request']['uri']['host'] = 'www.cakephp.org';
$baseConfig['port'] = $baseConfig['request']['uri']['port'] = 23;
$baseConfig['protocol'] = getprotobyname($baseConfig['protocol']);
$this->assertEquals($this->Socket->config, $baseConfig);

0 comments on commit 7c23d28

Please sign in to comment.
You can’t perform that action at this time.