From eba548ca8816a7e1cd04e08e4d24d549b10ea8d4 Mon Sep 17 00:00:00 2001 From: "A. Elleuch" Date: Thu, 20 Jul 2017 19:32:23 +0100 Subject: [PATCH] Add DisableCompression to override auto-decompress (#2216) Fixes https://github.com/minio/mc/issues/2209 --- cmd/client-s3.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/client-s3.go b/cmd/client-s3.go index 680c65fb..9a0ddb87 100644 --- a/cmd/client-s3.go +++ b/cmd/client-s3.go @@ -133,6 +133,13 @@ func newFactory() func(config *Config) (Client, *probe.Error) { TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, TLSClientConfig: tlsConfig, + // Set this value so that the underlying transport round-tripper + // doesn't try to auto decode the body of objects with + // content-encoding set to `gzip`. + // + // Refer: + // https://golang.org/src/net/http/transport.go?h=roundTrip#L1843 + DisableCompression: true, } if config.Debug {