Closed clseibold closed 6 months ago
The server hosting it is broken, pick a different mirror or set disable-http-decompression: true
on the source.
The server hosting it is broken
@TingPing No it's not. I can download the file just fine in a browser and open it just fine in Fedora KDE's Ark. I believe the problem is that the tarfile was created on a Windows system.
What a mystifying response...
This project uses libcurl, your browser does not, they implement HTTP differently.
> curl -v https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz
...
< content-encoding: x-gzip
...
The server gives the wrong response. Another mirror works or enable the option to ignore the content-encoding.
@TingPing It's a gzip file. What about the content encoding is incorrect?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding
This lets the recipient know how to decode the representation in order to obtain the original payload format.
So what libcurl does is ungzip the tar.gz, so the download becomes just a tar but has the filename tar.gz. gzip then errors when run on the tar file.
x-gzip is a valid content-encoding as far as I'm aware, it's just historical.
So what libcurl does is ungzip the tar.gz, so the download becomes just a tar but has the filename tar.gz. gzip then errors when run on the tar file.
Ok, thanks. Btw, this should have been the very first thing you mention in your first response to this issue.
Yes it's totally valid, curl respects it and ungzips the file.
I assume browsers just have a
if content_encoding == 'x-gzip' and filename.endswith('tar.gz'):
# The server is probably wrong don't ungzip
I guess we could do similar.
I was on my phone, sorry.
Having that check would probably be useful in case this comes up again, and to create consistency between browsers and flatpak-builder. Anyways, I'll see if a mirror works.
Checklist
flatpak-builder version
1.4.1
Flatpak version
1.15.8
How to reproduce
I'm using this archive as a source for a module: http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz
Expected Behavior
It should untar the archive
Actual Behavior
I'm getting this error:
Additional Information
Here's the output of using the
file
command on the archive: