src/Http/HttpIntegration.php
protected function headers(array $server)
    {
        $headers = array();

        foreach ((array) $server as $key => $value) {
            $http = strpos($key, 'HTTP_') === 0;

            $string = strtolower(substr($key, 5));

            $string = str_replace('_', ' ', $string);

            $string = ucwords(strtolower($string));

            $key = str_replace(' ', '-', $string);

            $http && $headers[$key] = $value;
        }

        return $headers;
    }
protected function headers(array $server)
    {
        $headers = array();

        foreach ((array) $server as $key => $value) {
            $http = strpos($key, 'HTTP_') === 0;

            $string = strtolower(substr($key, 5));

            $string = str_replace('_', ' ', $string);

            $string = ucwords(strtolower($string));

            $key = str_replace(' ', '-', $string);

            $http && $headers[$key] = $value;
        }

        return $headers;
    }
protected function headers ( array $ server ) { $ headers = array ( ) ; foreach ( ( array ) $ server as $ key => $ value ) { $ http = strpos ( $ key , 'HTTP_' ) === 0 ; $ string = strtolower ( substr ( $ key , 5 ) ) ; $ string = str_replace ( '_' , ' ' , $ string ) ; $ string = ucwords ( strtolower ( $ string ) ) ; $ key = str_replace ( ' ' , '-' , $ string ) ; $ http && $ headers [ $ key ] = $ value ; } return $ headers ; }
Converts $_SERVER parameters to message header values.

@param  array $server
@return array
Converts $_SERVER parameters to message header values .