mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:40:54 +00:00
change the compress leve to [0~9]
This commit is contained in:
parent
4db78f243e
commit
7bad3d1c67
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user