Service/Request/Response.php
protected function parserHttpHeadersAsArray($rawHeaders)
    {
        $headers = array();

        foreach(explode("\n", $rawHeaders) as $i => $line)
        {
            if($i == 0)
            {
                $headers['HTTP_STATUS'] = substr($line, 9, 3);
            }
            else
            {
                list($key, $value) = explode(': ', $line);
                $headers[trim($key)] = trim($value);
            }
        }

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

        foreach(explode("\n", $rawHeaders) as $i => $line)
        {
            if($i == 0)
            {
                $headers['HTTP_STATUS'] = substr($line, 9, 3);
            }
            else
            {
                list($key, $value) = explode(': ', $line);
                $headers[trim($key)] = trim($value);
            }
        }

        return $headers;
    }
protected function parserHttpHeadersAsArray ( $ rawHeaders ) { $ headers = array ( ) ; foreach ( explode ( "\n" , $ rawHeaders ) as $ i => $ line ) { if ( $ i == 0 ) { $ headers [ 'HTTP_STATUS' ] = substr ( $ line , 9 , 3 ) ; } else { list ( $ key , $ value ) = explode ( ': ' , $ line ) ; $ headers [ trim ( $ key ) ] = trim ( $ value ) ; } } return $ headers ; }
Convert string headers into an array

@param  string $rawHeaders
@return array HTTP Headers
Convert string headers into an array