From d9aed92fb44261826df081a78b03083978f15503 Mon Sep 17 00:00:00 2001 From: Niels Breuker Date: Fri, 19 May 2023 09:50:18 +0200 Subject: UrlClient: Fixed invalid Content-Length header. --- src/HTTP/UrlClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HTTP/UrlClient.cpp b/src/HTTP/UrlClient.cpp index 11e4d2cc1..24eeef0f1 100644 --- a/src/HTTP/UrlClient.cpp +++ b/src/HTTP/UrlClient.cpp @@ -353,7 +353,7 @@ public: // Send the headers: m_Link->Send(fmt::format(FMT_STRING("Host: {}\r\n"), m_ParentRequest.m_UrlHost)); - m_Link->Send(fmt::format(FMT_STRING("Content-Length: {}\r\n"), m_ParentRequest.m_Body)); + m_Link->Send(fmt::format(FMT_STRING("Content-Length: {}\r\n"), m_ParentRequest.m_Body.size())); for (const auto & hdr: m_ParentRequest.m_Headers) { m_Link->Send(fmt::format(FMT_STRING("{}: {}\r\n"), hdr.first, hdr.second)); -- cgit v1.2.3