On 4/1/22 06:21, Dietmar Maurer wrote:
      let response = if let Method::POST = request.method {
-        req.send(&*request.body)
+        let bytes = request.body.as_slice();
+        req.send_bytes(bytes)
Does this have the side effect of changing the transfer encoding? If so, it is 
worth to add an inline comment.

This makes sure that `Transfer-Encoding` is not set at all, but instead `Content-Length` is set.

AFAIK either one of those is required, but not both at the same time. And some endpoints don't seem to accept `Transfer-Encoding: chunked`.

I'll add an inline comment mentioning that, thanks!



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to