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:
parent
c03eceb004
commit
fe4810609a
@ -112,6 +112,7 @@ func respondWithImage(ctx context.Context, reqID string, r *http.Request, rw htt
|
|||||||
rw.Header().Set("Content-Encoding", "gzip")
|
rw.Header().Set("Content-Encoding", "gzip")
|
||||||
|
|
||||||
buf := responseBufPool.Get().(*bytes.Buffer)
|
buf := responseBufPool.Get().(*bytes.Buffer)
|
||||||
|
buf.Reset()
|
||||||
defer responseBufPool.Put(buf)
|
defer responseBufPool.Put(buf)
|
||||||
|
|
||||||
gzipData(data, buf)
|
gzipData(data, buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user