I´m sending an ajax request with a custom header called Authorization, and I'm trying to get that header with PHP
if (!function_exists('getallheaders')) 
    { 
        function getallheaders() 
        { 
               $headers = array();
                foreach ($_SERVER as $k => $v)
                {
                if (substr($k, 0, 5) == "HTTP_")
                {
                $k = str_replace('_', ' ', substr($k, 5));
                $k = str_replace(' ', '-', ucwords(strtolower($k)));
                $headers[$k] = $v;
                }
                }
                return $headers;
        } 
    }
    $val = getallheaders();
    echo $val;
and I get all the headers but not the custom one
val: Object{
  Accept: "application/json, text/plain, */*"
  Accept-Encoding: "gzip, deflate, sdch"
  Accept-Language: "es-ES,es;q=0.8,en;q=0.6"
  Connection: "keep-alive"
  Host: "www.localhost.com"
  Origin: "http://localhost"
  Referer: "http://localhost/gestion/"
  User-Agent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,           like Gecko) Chrome/41.0.2272.101 Safari/537.36"
}

Any clues why I'm not getting header Authorization?