Various fixes and tweaks

This commit is contained in:
Alex Bilbie
2013-02-08 11:40:33 +00:00
parent 89f3c35466
commit 60b2caf41d
3 changed files with 32 additions and 20 deletions

View File

@@ -168,7 +168,7 @@ class ResourceServer
}
if (empty($access_token)) {
throw new Exception\MissingAccessTokenException('Access Token is Missing');
throw new Exception\InvalidAccessTokenException('Access token is missing');
}
return $access_token;

View File

@@ -66,8 +66,10 @@ class Request implements RequestInterface
protected function readHeaders()
{
if (function_exists('getallheaders')) {
// @codeCoverageIgnoreStart
$headers = getallheaders();
} else {
// @codeCoverageIgnoreEnd
$headers = array();
foreach ($this->server() as $name => $value) {
if (substr($name, 0, 5) == 'HTTP_') {