diff --git a/context/acceptencoder.go b/context/acceptencoder.go index bc048e77..e73744f5 100644 --- a/context/acceptencoder.go +++ b/context/acceptencoder.go @@ -48,7 +48,7 @@ func InitGzip(cf config.Configer) { gzipCompressLevel = flate.BestSpeed } methods := cf.DefaultStrings("includedMethods", []string{"GET"}) - getMethodOnly = len(methods) == 1 && strings.ToUpper(methods[0]) == "GET" + getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET") for _, v := range methods { includedMethods[strings.ToUpper(v)] = true }