Fix resetting compressor on passthrough

This commit is contained in:
Ingo Oppermann 2024-10-15 15:01:36 +02:00
parent bc12123191
commit 0e191d671e
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -204,6 +204,8 @@ func NewWithConfig(config Config) echo.MiddlewareFunc {
grw.buffer.WriteTo(rw)
compressor.Reset(io.Discard)
}
} else {
compressor.Reset(io.Discard)
}
compressor.Close()
mem.Put(buffer)