protected function sendHeaders()
    {
        if (headers_sent()) return false;

        header(sprintf(
            'HTTP/%s %s %s',
            $this->getProtocolVersion(),
            $this->getStatusCode(),
            $this->getReasonPhrase()
        ));

        foreach ($this->getHeaderKeys() as $name)
        {
            header(sprintf('%s: %s', $name, $this->getHeaderLine($name)), true);
        }

        return true;
    }