diff --git a/context/acceptencoder.go b/context/acceptencoder.go index 1c3cf1d5..cb735445 100644 --- a/context/acceptencoder.go +++ b/context/acceptencoder.go @@ -44,7 +44,7 @@ func InitGzip(minLength, compressLevel int, methods []string) { gzipMinLength = minLength } gzipCompressLevel = compressLevel - if gzipCompressLevel < flate.DefaultCompression || gzipCompressLevel > flate.BestCompression { + if gzipCompressLevel < flate.NoCompression || gzipCompressLevel > flate.BestCompression { gzipCompressLevel = flate.BestSpeed } getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")