fkooman/php-rest-service — pull request #1 by lafka (2013-05-16 00:58:45+00:00)
Title: Fix authorization header for nginx

nginx w/php-fpm forwards this header, alternativly it can be forced
by using something similar to.

I'm a little bit confused about the function itself, should it return a list of normalized header values or `$_SERVER ++ [AUTHORIZATION => _]`? If the first is true you can use this to normalize headers based on `$_SERVER`:

```php
foreach ($_SERVER as $k => $v) {
if ('HTTP_' === substr($k, 0, 5)) {
$requestHeaders[substr(strtr(mb_convert_case($k, MB_CASE_TITLE), '_', '-'), 5)] = $v;
}
}
```