Source archive file extension (tar.gz)

Hi,

Maybe something to consider for the next release:

The tar.gz extension of the agent++ and snmp++ source release packages suggests that the files are gzip compressed tar archives, when in fact they are uncompressed. Trying to extract them with GNU tar (as used on most Linux distros) leads to the following:

# Trying to extract the file with tar z option to pass through gzip:
tar zxf agent++-4.1.2.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

# Checking with file what's going on tells me it's actually a tar archive (i.e. uncompressed)
file agent++-4.1.2.tar.gz
agent++-4.1.2.tar.gz: tar archive

# Trying to extract the file without tar z option as you would do for uncompressed archives.
# Even this fails because it enables automatic detection of compression, based on the file extension.
tar xf agent++-4.1.2.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

# Hiding the file extension by piping it to tar through stdin: Success!!!
cat agent++-4.1.2.tar.gz | tar xf -

Or I could have just renamed the file from *.tar.gz to *.tar.

Of course making it a proper tar.gz archive will give the added benefit of
significantly smaller archives, e.g. the current agent+±4.1.2.tar.gz file would shrink from 3.9 MBytes to 822 KBytes.

Regards,

Holger

Hi Holger,

That is a misunderstanding on your side, because your browser has done the uncompress while it downloaded the file but failed to change the file extension properly.
That is a common error with some browsers/default settings.

The file on the server is compressed and is small as it should be :slight_smile:

Best regards,
Frank

Hi,

I think this happens because the agentpp server sends the files with Content-Encoding: x-gzip, which makes the browser think the file was compressed to save bandwidth while being transmitted and should be decompressed. Removing the Content-Encoding entry from the header would probably cause the file to be saved without decompressing it first, as it should be.

wget https://agentpp.com/download/snmp++-3.3.11a.tar.gz --debug 2>&1 |grep gzip
Content-Type: application/gzip
Content-Encoding: x-gzip                  <<<<<< I think this shouldn't be there
Length: 703639 (687K) [application/gzip]

Regards,

Holger

Hi Holger,

I am not sure, but I think I could fix the settings of the web server. Could you please try again?
(I am failing to reproduce the problem with the browsers I have)

Best regards,
Frank

Hi Frank,

I just tried it and the Content-Encoding header is gone. Also tried with my browser (Chrome) and the file now downloads correctly without being decompressed.

Thank you,

Holger