1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

Reset response buffer

This commit is contained in:
DarthSim 2018-10-28 17:57:40 +06:00
parent c03eceb004
commit fe4810609a

View File

@ -112,6 +112,7 @@ func respondWithImage(ctx context.Context, reqID string, r *http.Request, rw htt
rw.Header().Set("Content-Encoding", "gzip")
buf := responseBufPool.Get().(*bytes.Buffer)
buf.Reset()
defer responseBufPool.Put(buf)
gzipData(data, buf)