]> git.proxmox.com Git - proxmox.git/commit
fix Open ID with Azure as provider
authorMira Limbeck <m.limbeck@proxmox.com>
Fri, 1 Apr 2022 09:44:25 +0000 (11:44 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Apr 2022 13:53:44 +0000 (15:53 +0200)
commit4aff0d7c95049b736f7c1ba7919886d0b61d1839
treec21b52b796a721d9a304f2c29bbc3975f113b823
parent1f47f7d3ebbce6a667d780770f74db600fdca02b
fix Open ID with Azure as provider

Azure doesn't accept `Transfer-Encoding: chunked` on their token endpoint,
but with the switch to ureq we always send requests with this set.

Fix by switching to `Content-Length` in the header instead. ureq only
sets `Transfer-Encoding: chunked` when the body length is not known
beforehand, which is the case when using `send`. See
https://docs.rs/ureq/2.4.0/ureq/index.html#content-length-and-transfer-encoding

See https://forum.proxmox.com/threads/openid-401-with-azure-ad.105892/
for the issue.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
src/http_client.rs