protected function setEmptyResponse()
    {
        $empty = in_array($this->status, static::NO_BODY_STATUSES);

        if ($this->request->isHead() || $empty) {
            $this->body = null;
        }

        if ($empty) {
            $this->headers->delete('content-length');
            $this->headers->delete('content-type');
        }
    }