From e2200cfa8939eb7fd8f02f1866c852497376c202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=BF=D0=BE=D0=B4=D0=BE=D0=B1=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=90=D0=BB=D0=B5=D0=BD?= Date: Thu, 20 Oct 2022 16:22:36 +0300 Subject: [PATCH] Committing updates. --- src/modules/Workers/WebService/WebService.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/Workers/WebService/WebService.cpp b/src/modules/Workers/WebService/WebService.cpp index 0b975e3..3bdc6c3 100644 --- a/src/modules/Workers/WebService/WebService.cpp +++ b/src/modules/Workers/WebService/WebService.cpp @@ -886,6 +886,7 @@ namespace Apostol { const auto &caHost = pServerRequest->Headers["host"]; const auto &caOrigin = pServerRequest->Headers["origin"]; + const auto &caContentType = pServerRequest->Headers["content-type"].Lower(); const auto &address = GetAddress(pServerRequest); const auto &code = pServerRequest->Params["code"]; @@ -906,15 +907,15 @@ namespace Apostol { pProxyRequest->Clear(); pProxyRequest->Location = pServerRequest->Location; - pProxyRequest->ContentType = StringToContentType(pServerRequest->Headers[_T("Content-Type")].Lower()); if (Method == "POST") { + pProxyRequest->ContentType = StringToContentType(caContentType); pProxyRequest->Content = pServerRequest->Content; } pProxyRequest->CloseConnection = true; - CHTTPRequest::Prepare(pProxyRequest, Method.c_str(), URI.c_str()); + CHTTPRequest::Prepare(pProxyRequest, Method.c_str(), URI.c_str(), caContentType.c_str()); pProxyRequest->AddHeader("Authorization", "Bearer " + m_CurrentServer.Tokens()["access_token"]);