Просмотр исходного кода

Merge pull request #14266 from overleaf/bg-node-18-avoid-chunked-uploads

send content-length header when creating blobs

GitOrigin-RevId: fd541f307786cc883c6545ed8dfb750b03a025f2
Brian Gough 3 лет назад
Родитель
Сommit
06c3de586a
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      services/project-history/app/js/HistoryStoreManager.js

+ 1 - 0
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 => {