mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 13:20:56 +00:00
some typo fixed
This commit is contained in:
parent
0b401481ef
commit
9f21928a90
@ -32,7 +32,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
//Content will only be compressed if content length is either unknown or greater than gzipMinLength.
|
//Content will only be compressed if content length is either unknown or greater than gzipMinLength.
|
||||||
gzipMinLength int
|
gzipMinLength int
|
||||||
//Default size==20B like nginx
|
//Default size==20B same as nginx
|
||||||
defaultGzipMinLength = 20
|
defaultGzipMinLength = 20
|
||||||
//The compression level used for deflate compression. (0-9).
|
//The compression level used for deflate compression. (0-9).
|
||||||
gzipCompressLevel int
|
gzipCompressLevel int
|
||||||
@ -43,7 +43,7 @@ var (
|
|||||||
|
|
||||||
func InitGzip(cf config.Configer) {
|
func InitGzip(cf config.Configer) {
|
||||||
gzipMinLength = cf.DefaultInt("gzipMinLength", defaultGzipMinLength)
|
gzipMinLength = cf.DefaultInt("gzipMinLength", defaultGzipMinLength)
|
||||||
gzipCompressLevel = cf.DefaultInt("gzipCompressLevel", flate.DefaultCompression)
|
gzipCompressLevel = cf.DefaultInt("gzipCompressLevel", flate.BestSpeed)
|
||||||
if gzipCompressLevel < flate.DefaultCompression || gzipCompressLevel > flate.BestCompression {
|
if gzipCompressLevel < flate.DefaultCompression || gzipCompressLevel > flate.BestCompression {
|
||||||
gzipCompressLevel = flate.BestSpeed
|
gzipCompressLevel = flate.BestSpeed
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user