1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-30 23:34:13 +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 return
} }
wr.Reset(nil) wr.Reset(nil)
//notice //notice
//compressionLevel==BestCompression DOES NOT MATTER //compressionLevel==BestCompression DOES NOT MATTER
//sync.Pool will not memory leak //sync.Pool will not memory leak
switch level { switch level {
case gzipCompressLevel: case gzipCompressLevel:
ac.customCompressLevelPool.Put(wr) ac.customCompressLevelPool.Put(wr)