Restore header() behavior inadvertantely removed.

In eaa2bbbcae I changed the behavior to
now use the TitleCased name as I didn't understand the intended behavior
or how apache was working in the reporter's specific case.

Refs #9229
This commit is contained in:
mark_story 2016-08-11 21:53:46 -04:00
parent 5019cbddfe
commit bc73e928b6
2 changed files with 6 additions and 6 deletions

View file

@ -1147,13 +1147,14 @@ class CakeRequestTest extends CakeTestCase {
$_SERVER['HTTP_X_THING'] = '';
$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-ca) AppleWebKit/534.8+ (KHTML, like Gecko) Version/5.0 Safari/533.16';
$_SERVER['AUTHORIZATION'] = 'foobar';
$_SERVER['Authorization'] = 'foobar';
$request = new CakeRequest('/', false);
$this->assertEquals($_SERVER['HTTP_HOST'], $request->header('host'));
$this->assertEquals($_SERVER['HTTP_USER_AGENT'], $request->header('User-Agent'));
$this->assertSame('', $request->header('X-thing'));
$this->assertEquals($_SERVER['AUTHORIZATION'], $request->header('Authorization'));
$this->assertEquals($_SERVER['Authorization'], $request->header('Authorization'));
$this->assertFalse($request->header('authorization'));
}
/**