From 0eaaad44baa051fbd658af6f0f304b2f8a301808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C3=87=C4=B0N=C4=B0?= Date: Tue, 22 Aug 2023 13:03:15 +0300 Subject: [PATCH] fix(api): multipart array length calculation fixed --- src/message.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/message.js b/src/message.js index 7d6224f..1596985 100644 --- a/src/message.js +++ b/src/message.js @@ -149,11 +149,13 @@ function multipartEncode( const contentArray = new Uint8Array(datasetBuffer); const contentLength = contentArray.length; - length += headerLength + contentLength + footerLength; + length += headerLength + contentLength; return contentArray; }); + length += footerLength; + // Allocate the array const multipartArray = new Uint8Array(length);