Commit 410b4016 authored by ilackarms's avatar ilackarms

periodically flush writer

parent 188e6ebc
......@@ -136,6 +136,7 @@ func (c *compressionResponseWriter) Write(p []byte) (int, error) {
return -1, errors.New("compressing error: tried to write data using closed compressor")
}
c.Header().Set(headerContentEncoding, c.encoding)
defer c.compressor.Flush()
return c.compressor.Write(p)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment