Skip to content

Commit

Permalink
Fix coding standard violations
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvinRoss committed Jun 12, 2014
1 parent 86923e3 commit 3615315
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Network/CakeSocket.php
Expand Up @@ -131,8 +131,8 @@ public function connect() {
}

$scheme = null;
if (!empty($this->config['protocol']) && strpos($this->config['host'], '://') === false) {
$scheme = $this->config['protocol'].'://';
if (!empty($this->config['protocol']) && strpos($this->config['host'], '://') === false) {
$scheme = $this->config['protocol'] . '://';
}

if (!empty($this->config['context'])) {
Expand Down
8 changes: 3 additions & 5 deletions lib/Cake/Network/Http/HttpSocket.php
Expand Up @@ -341,8 +341,8 @@ public function request($request = array()) {
if (!empty($this->request['body']) && !isset($this->request['header']['Content-Length'])) {
$this->request['header']['Content-Length'] = strlen($this->request['body']);
}
if(isset($this->request['uri']['scheme']) && $this->request['uri']['scheme'] === 'https'){
$this->config['protocol'] = 'ssl';
if (isset($this->request['uri']['scheme']) && $this->request['uri']['scheme'] === 'https' && empty($this->config['protocol'])) {
$this->config['protocol'] = 'ssl';
}

$connectionType = null;
Expand Down Expand Up @@ -525,7 +525,7 @@ public function delete($uri = null, $data = array(), $request = array()) {
}

/**
* Issues a HEADER request to the specified URI, query, and request.
* Issues a HEAD request to the specified URI, query, and request.
*
* @param string|array $uri URI to request (see {@link _parseUri()})
* @param array $data Array of request body data keys and values.
Expand All @@ -537,8 +537,6 @@ public function head($uri = null, $data = array(), $request = array()) {
return $this->request($request);
}



/**
* Normalizes URLs into a $uriTemplate. If no template is provided
* a default one will be used. Will generate the URL using the
Expand Down

0 comments on commit 3615315

Please sign in to comment.