From 4855c5fdeaf59f722bb269e52d5c8b278b415f44 Mon Sep 17 00:00:00 2001 From: Christian Vogt Date: Tue, 17 Oct 2023 11:53:31 -0400 Subject: [PATCH] set content-length header to byte length to account for character encoding --- backend/src/utils/httpUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/utils/httpUtils.ts b/backend/src/utils/httpUtils.ts index 6b7ae051c2..014e7354b1 100644 --- a/backend/src/utils/httpUtils.ts +++ b/backend/src/utils/httpUtils.ts @@ -55,7 +55,7 @@ export const proxyCall = ( requestOptions.headers = { ...requestOptions.headers, 'Content-Type': contentType, - 'Content-Length': requestData.length, + 'Content-Length': Buffer.byteLength(requestData, 'utf8'), }; }