Skip to content
Permalink
Browse files

If method is false, dont send the authentication. Fixed throw message.

  • Loading branch information...
jrbasso committed Nov 13, 2010
1 parent 1dfd3ce commit 1d56625f3a243e90733eb864fd2f4572abf6c713
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/libs/http_socket.php
@@ -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(
@@ -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);
}

0 comments on commit 1d56625

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