Skip to content

Commit

Permalink
If method is false, dont send the authentication. Fixed throw message.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Nov 13, 2010
1 parent 1dfd3ce commit 1d56625
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cake/libs/http_socket.php
Expand Up @@ -441,6 +441,9 @@ public function url($url = null, $uriTemplate = null) {
* @throws Exception
*/
protected function _setAuth() {
if ($this->request['auth']['method'] === false) {
return;
}
if (empty($this->request['auth']['method'])) {
if (isset($this->request['uri']['user'], $this->request['uri']['pass']) && !isset($this->request['auth']['user'])) {
$this->request['auth'] = array(
Expand All @@ -454,7 +457,7 @@ protected function _setAuth() {
}
$authClass = Inflector::camelize($this->request['auth']['method']) . 'Method';
if (!App::import('Lib', 'http/' . $authClass)) {
throw new Exception(__('Authentication method unknown.'));
throw new Exception(__('Unknown authentication method.'));
}
$authClass::authentication($this);
}
Expand Down

0 comments on commit 1d56625

Please sign in to comment.