Applying patch from 'mattcurry' fixes Basic authentication case sensitivity in HttpSocket. Fixes #6088

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8023 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2009-02-11 23:46:59 +00:00
parent 5026a6c89f
commit 2fc177869e
2 changed files with 8 additions and 6 deletions

View file

@ -66,7 +66,7 @@ class HttpSocket extends CakeSocket {
'fragment' => null
),
'auth' => array(
'method' => 'basic',
'method' => 'Basic',
'user' => null,
'pass' => null
),
@ -121,7 +121,7 @@ class HttpSocket extends CakeSocket {
'port' => 80
),
'auth' => array(
'method' => 'basic',
'method' => 'Basic',
'user' => null,
'pass' => null
),

View file

@ -113,7 +113,7 @@ class HttpSocketTest extends CakeTestCase {
, 'port' => 23
),
'auth' => array(
'method' => 'basic'
'method' => 'Basic'
, 'user' => 'bob'
, 'pass' => 'secret'
),
@ -142,7 +142,7 @@ class HttpSocketTest extends CakeTestCase {
, 'port' => 80
),
'auth' => array(
'method' => 'basic'
'method' => 'Basic'
, 'user' => null
, 'pass' => null
),
@ -187,7 +187,7 @@ class HttpSocketTest extends CakeTestCase {
, 'port' => 80,
)
, 'auth' => array(
'method' => 'basic'
'method' => 'Basic'
,'user' => null
,'pass' => null
),
@ -207,7 +207,7 @@ class HttpSocketTest extends CakeTestCase {
, 'fragment' => null
)
, 'auth' => array(
'method' => 'basic'
'method' => 'Basic'
, 'user' => null
, 'pass' => null
)
@ -401,8 +401,10 @@ class HttpSocketTest extends CakeTestCase {
$this->Socket->reset();
$serverResponse = "HTTP/1.x 200 OK\r\nSet-Cookie: foo=bar\r\nDate: Mon, 16 Apr 2007 04:14:16 GMT\r\nServer: CakeHttp Server\r\nContent-Type: text/html\r\n\r\n<h1>This is a cookie test!</h1>";
unset($this->Socket->_mock->_actions->_at['read']);
unset($this->Socket->_mock->_return_sequence['read']);
$this->Socket->_mock->_call_counts['read'] = 0;
$this->Socket->setReturnValueAt(0, 'read', $serverResponse);
$this->Socket->connected = true;
$this->Socket->request($request);
$result = $this->Socket->response['cookies'];