From 1d56625f3a243e90733eb864fd2f4572abf6c713 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sat, 13 Nov 2010 17:21:52 -0200 Subject: [PATCH] If method is false, dont send the authentication. Fixed throw message. --- cake/libs/http_socket.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cake/libs/http_socket.php b/cake/libs/http_socket.php index 7a595364ef8..a903aa44527 100644 --- a/cake/libs/http_socket.php +++ b/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); }