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
File Size check should deflate the url response to compute size if content-encoding: gzip is in the headers
Current Behavior
File size is taken from the content-length. Since the file on the server was sent as compressed, it is smaller than the file to be checked.
Possible Solution
The file downloads to the correct size, so maybe it gets downloaded with a temporary extension, after it completes, we check the file size of the temporary. Afterwards, remove the temporary extension before the md5 check.
Examining the headers in firefox, github is responding with a gzip compression, so this line is returning a compressed value to be judged by the same_file size
Thanks for the clear problem description and helpful link, @savionlee. I have posted the above commit, 085d119, in a branch, but this needs testing in a clean system. I may have time later today, but not at the moment.
Expected Behavior
File Size check should deflate the url response to compute size if
content-encoding: gzip
is in the headersCurrent Behavior
File size is taken from the
content-length
. Since the file on the server was sent as compressed, it is smaller than the file to be checked.Possible Solution
The file downloads to the correct size, so maybe it gets downloaded with a temporary extension, after it completes, we check the file size of the temporary. Afterwards, remove the temporary extension before the md5 check.
Alternatively, I found this stackexchange that says to deflate and then do what you want. https://stackoverflow.com/questions/20537432/force-webserver-to-return-uncompressed-data-no-gzip
Steps to Reproduce
Context (Environment)
Fedora 39, GNOME Wayland
Detailed Description
On a fresh install, the installer fails with error
In debug log, it shows a smaller url_size than after the size of the file downloaded:
Examining the headers in firefox, github is responding with a gzip compression, so this line is returning a compressed value to be judged by the same_file size
Headers to the raw file:
LogosLinuxInstaller/utils.py Line 92
Possible Implementation
The text was updated successfully, but these errors were encountered: