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);