diff --git a/ron.go b/ron.go index 9778111..2f9e846 100644 --- a/ron.go +++ b/ron.go @@ -22,6 +22,7 @@ type ( responseWriterWrapper struct { http.ResponseWriter + http.Flusher headerWritten bool } @@ -76,6 +77,10 @@ func (w *responseWriterWrapper) Write(b []byte) (int, error) { return w.ResponseWriter.Write(b) } +func (w *responseWriterWrapper) Flush() { + w.ResponseWriter.(http.Flusher).Flush() +} + func defaultEngine() *Engine { return &Engine{ mux: http.NewServeMux(),