From ce25e698f8f886b68149cfe1dbf27f26d94f226c Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Wed, 27 Jan 2021 04:09:46 +0200 Subject: [PATCH] minor --- context/response_writer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/context/response_writer.go b/context/response_writer.go index e52f4e13..12dd7e8a 100644 --- a/context/response_writer.go +++ b/context/response_writer.go @@ -373,6 +373,9 @@ func (w *responseWriter) Flusher() (http.Flusher, bool) { // Flush sends any buffered data to the client. func (w *responseWriter) Flush() { if flusher, ok := w.Flusher(); ok { + // Flow: WriteHeader -> Flush -> Write -> Write -> Write.... + w.tryWriteHeader() + flusher.Flush() } }