From 06c3de586a5e8dea7e91b487d6b485dcb06e9678 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 11 Aug 2023 09:05:51 +0100 Subject: [PATCH] Merge pull request #14266 from overleaf/bg-node-18-avoid-chunked-uploads send content-length header when creating blobs GitOrigin-RevId: fd541f307786cc883c6545ed8dfb750b03a025f2 --- services/project-history/app/js/HistoryStoreManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/project-history/app/js/HistoryStoreManager.js b/services/project-history/app/js/HistoryStoreManager.js index 97947fa46c..42bbe0c4a2 100644 --- a/services/project-history/app/js/HistoryStoreManager.js +++ b/services/project-history/app/js/HistoryStoreManager.js @@ -312,6 +312,7 @@ function _createBlob(historyId, fsPath, _callback) { fetchNothing(url, { method: 'PUT', body: outStream, + headers: { 'Content-Length': byteLength }, // add the content length to work around problems with chunked encoding in node 18 ...getHistoryFetchOptions(), }) .then(res => {