diff --git a/backend/compress/compress.go b/backend/compress/compress.go index fbd99ac9f..db90dca25 100644 --- a/backend/compress/compress.go +++ b/backend/compress/compress.go @@ -401,6 +401,10 @@ func isCompressible(r io.Reader) (bool, error) { if err != nil { return false, err } + err = w.Close() + if err != nil { + return false, err + } ratio := float64(n) / float64(b.Len()) return ratio > minCompressionRatio, nil }