You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skipping the version info and such because I can point to the problem in the source code (and I'll be submitting a pull request).
The content-length header specifies the size of the raw data in the HTTP body. If the data is uncompressed, that is the same thing as the size of the file that was downloaded. However, if compression was enabled for the response, content-length specifies the compressed size of the data.
electron-updater treats content-length as the size of the uncompressed data (node/Electron handles the decompression transparently), which is incorrect.
This code creates a result buffer based on the value of content-length
callback(newError(`Received data length ${position} is not equal to expected ${result.length}`))
The text was updated successfully, but these errors were encountered:
NoahAndrews
changed the title
Differential downloads are broken when the blockmap HTTP response is compressed
Differential downloads don't work when the blockmap HTTP response is compressed
Apr 13, 2023
Skipping the version info and such because I can point to the problem in the source code (and I'll be submitting a pull request).
The
content-length
header specifies the size of the raw data in the HTTP body. If the data is uncompressed, that is the same thing as the size of the file that was downloaded. However, if compression was enabled for the response,content-length
specifies the compressed size of the data.electron-updater
treatscontent-length
as the size of the uncompressed data (node/Electron handles the decompression transparently), which is incorrect.This code creates a
result
buffer based on the value ofcontent-length
electron-builder/packages/builder-util-runtime/src/httpExecutor.ts
Lines 242 to 252 in 7c05c36
And this code raises an error if the size of the received data does not match the size of that
result
bufferelectron-builder/packages/builder-util-runtime/src/httpExecutor.ts
Lines 270 to 272 in 7c05c36
The text was updated successfully, but these errors were encountered: