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;
    }