1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 11:20:57 +00:00

some typo fixed

This commit is contained in:
JessonChan 2016-03-17 20:07:24 +08:00
parent 0b401481ef
commit 9f21928a90

View File

@ -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
} }