protected function getHeaders()
    {
        if (function_exists('headers_list') && $headers = headers_list()) {
            foreach ((array) $headers as $header) {
                if (strpos($header, ':')) {
                    $header = explode(':', strtolower($header), 2);
                    $this->headers[trim($header[0])] = trim($header[1]);
                }
            }
        }
    }