private function setContentLength()
    {
        if (!is_string($this->body)) {
            return;
        }

        $headers = array_map('strtolower', array_keys($this->headers));

        if (!in_array('content-length', $headers, true)) {
            $this->headers['Content-Length'] = strlen($this->body);
        }
    }