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() } }