mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:10: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
|
gzipMinLength = minLength
|
||||||
}
|
}
|
||||||
gzipCompressLevel = compressLevel
|
gzipCompressLevel = compressLevel
|
||||||
if gzipCompressLevel < flate.DefaultCompression || gzipCompressLevel > flate.BestCompression {
|
if gzipCompressLevel < flate.NoCompression || gzipCompressLevel > flate.BestCompression {
|
||||||
gzipCompressLevel = flate.BestSpeed
|
gzipCompressLevel = flate.BestSpeed
|
||||||
}
|
}
|
||||||
getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")
|
getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")
|
||||||
|
Loading…
Reference in New Issue
Block a user