On 01.04.22 11:44, Mira Limbeck wrote:
> 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.limb...@proxmox.com>
> ---
> v3:
>  - fixed link in inline comment
> 
> v2:
>  - added inline comment
>  - removed the unnecessary `let bytes = ...` line
>  - changed link in commit message to versioned docs.rs
> 
> probably also fixes https://bugzilla.proxmox.com/show_bug.cgi?id=3916,
> but I could only reproduce this exact error message with Azure until
> now.
> 
>  src/http_client.rs | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
>

great find!
applied, many thanks!


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

Reply via email to