mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
Fix flushing in Gzip middleware (#1317)
* Make Gzip response Writer also call Flush of underlying Writer * Add unit test for chunked responses with Gzip
This commit is contained in:
committed by
Vishal Rana
parent
e3717be4be
commit
69bd47b35f
@ -111,6 +111,9 @@ func (w *gzipResponseWriter) Write(b []byte) (int, error) {
|
||||
|
||||
func (w *gzipResponseWriter) Flush() {
|
||||
w.Writer.(*gzip.Writer).Flush()
|
||||
if flusher, ok := w.ResponseWriter.(http.Flusher); ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
}
|
||||
|
||||
func (w *gzipResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
|
Reference in New Issue
Block a user