bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] nettle-3.4.tar.gz isn't actually compressed


From: Niels Möller
Subject: Re: [Bug-wget] nettle-3.4.tar.gz isn't actually compressed
Date: Mon, 20 Nov 2017 13:14:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix)

bug-wget context: Running

  wget http://www.lysator.liu.se/~nisse/archive/nettle-3.4.tar.gz

unexpectedly decompresses the file before saving it to disk, and this
seems to be a change of behavior in wget-19.2.

The HTTP headers include

  Content-Type: application/unix-tar
  Content-Encoding: x-gzip

address@hidden writes:

>> If you download with wget, you get the original compressed archive,
>> .tar.gz.
>
>
> actually, it is the other way around: the result I reported is obtained
> when downloading with wget. If I download with curl or a web browser (I
> use elinks as my default browser, but the same holds when using
> firefox), I get a compressed tar archive.
>
> So, basically:
>
>           downloaded with   de/compression
>           ================================
>           (plain) wget      uncompressed
>           curl              compressed
>           elinks            compressed
>           firefox           compressed

Odd. I tried both wget and curl before my previous mail, and for me,
they both produced the compressed file. 

Maybe depends on version of wget? I probably used wget-1.18 (the version
in debian stable; I don't have access to the same system at the moment
so I'm not 100% sure). 

It looks like the --compression option was introduced in wget-19.2 (see
http://git.savannah.gnu.org/cgit/wget.git/tree/NEWS), maybe the default
behavior was changed at the same time?

I'm afraid I'm not a HTTP guru, but I think it would make sense to
change wget default behavior to automatically decompress
content-transfer-encoding, but *not* decompress content-encoding. And have
this overridable with the --compression flag.

Best regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]