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

gzip method support

This commit is contained in:
JessonChan 2016-03-17 19:40:29 +08:00
parent 5a9bff2000
commit 35e34261ab

View File

@ -96,9 +96,11 @@ func (ac acceptEncoder) put(wr resetWriter, level int) {
return
}
wr.Reset(nil)
//notice
//compressionLevel==BestCompression DOES NOT MATTER
//sync.Pool will not memory leak
switch level {
case gzipCompressLevel:
ac.customCompressLevelPool.Put(wr)