diff --git a/stat_handler.go b/stat_handler.go index 421856c..3dd7bd0 100644 --- a/stat_handler.go +++ b/stat_handler.go @@ -45,3 +45,9 @@ func (h *statResponseWriter) WriteHeader(code int) { h.handler.scope.NewCounter(strconv.Itoa(code)).Inc() h.delegate.WriteHeader(code) } + +func (h *statResponseWriter) Flush() { + if flusher, ok := h.delegate.(http.Flusher); ok { + flusher.Flush() + } +}