curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Proposal to change default handling for content-encoded responses

From: Kartikaya Gupta <lists.curl_at_staktrace.com>
Date: Tue, 30 Oct 2018 12:06:15 +0000

On Tue, Oct 30, 2018 at 10:14:06AM +0100, Dan Fandrich wrote:
> Any script that downloads compressed tar balls will suddenly start breaking on
> many servers if curl starts silently decompressing them. Many servers mark
> these with Content-Encoding: gzip so this is a very common case, I would guess.
> I'd say that having it on by default would probably make more sense if it
> weren't for this.

Are you referring to tarballs that are already compressed (e.g. foo.tgz
or foo.tar.gz)? If so, the server should only be marking it
'Content-Encoding: gzip' if the the tarball is double-compressed. If it
is sending the raw foo.tgz bytes with a 'Content-Encoding: gzip' that
sounds like a server bug.

Or do you mean that the uncompressed tarball (foo.tar) is compressed by
the server and sent down with 'Content-Encoding: gzip'? If that's the
case I would expect the client side to be expecting the uncompressed
tarball, not the compressed one.

In other words, the content-encoding should be transparent to the end
user (who/whatever is invoking curl). It's something to be negotiated
between curl and the server, although of course it can be requested via
curl options.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-10-30