public function setBody($body)
    {
        if (!empty($body) && !HttpCode::isBodyAllowed($this->code)) {
            throw new LogicException('You cannot set non-empty body for currently set code');
        }

        $this->body = (string)$body;
        $this->setHeader('Content-Length', strlen($this->body));
        $this->messageCache = null;
    }