From 95de83431b9a9a1a3cc3dd042e72a3c10154480c Mon Sep 17 00:00:00 2001 From: scribam Date: Fri, 31 May 2024 11:52:16 +0200 Subject: [PATCH] uwp: fix http ContentLength assignment --- shell/uwp/http_client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/uwp/http_client.cpp b/shell/uwp/http_client.cpp index 68de14302..83d218760 100644 --- a/shell/uwp/http_client.cpp +++ b/shell/uwp/http_client.cpp @@ -18,6 +18,7 @@ */ #include "oslib/http_client.h" #include "stdclass.h" +#include namespace http { @@ -104,7 +105,7 @@ int post(const std::string& url, const char *payload, const char *contentType, s { Uri^ uri = ref new Uri(ref new String(wurl.get())); HttpStringContent^ content = ref new HttpStringContent(ref new String(wpayload.get())); - content->Headers->ContentLength = strlen(payload); + content->Headers->ContentLength = ref new Box(strlen(payload)); if (contentType != nullptr) content->Headers->ContentType = ref new HttpMediaTypeHeaderValue(ref new String(wcontentType.get()));