private function sendStatus()
    {
        if (headers_sent()) return;

        if (isset($this->status_messages[$this->status])) {
            header(sprintf('HTTP/%s %d %s', $this->request->getHttpVersion(), $this->status, $this->status_messages[$this->status]));
        } else {
            header('Status: ' . $this->status);
        }
    }