Skip to content

Commit

Permalink
uwp: fix http ContentLength assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam authored and flyinghead committed May 31, 2024
1 parent 112e05e commit 95de834
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shell/uwp/http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "oslib/http_client.h"
#include "stdclass.h"
#include <windows.h>

namespace http {

Expand Down Expand Up @@ -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<UINT64>(strlen(payload));
if (contentType != nullptr)
content->Headers->ContentType = ref new HttpMediaTypeHeaderValue(ref new String(wcontentType.get()));

Expand Down

0 comments on commit 95de834

Please sign in to comment.