From 16ba36f52ad460d4c060e7db2d6009a7d8e5c3cb Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 30 Jul 2022 12:57:30 +0200 Subject: [PATCH] Fix bug where JSON remote function invocations weren't always parsed properly --- packages/common/spaces/http_space_primitives.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/spaces/http_space_primitives.ts b/packages/common/spaces/http_space_primitives.ts index d9f94c6..e567d1c 100644 --- a/packages/common/spaces/http_space_primitives.ts +++ b/packages/common/spaces/http_space_primitives.ts @@ -143,7 +143,7 @@ export class HttpSpacePrimitives implements SpacePrimitives { if (req.headers.get("Content-length") === "0") { return; } - if (req.headers.get("Content-type") === "application/json") { + if (req.headers.get("Content-type")?.includes("application/json")) { return await req.json(); } else { return await req.text();