UrlClient: Fixed invalid Content-Length header.

This commit is contained in:
Niels Breuker 2023-05-19 09:50:18 +02:00 committed by Mattes D
parent f673e59b21
commit d9aed92fb4

View File

@ -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));