fix: implement Flush on trackingResponseWriter

Allows the trackingResponseWriter to properly proxy flush
requests to the underlying http.Flusher. This ensures
compatibility with streaming responses.
This commit is contained in:
ping
2026-05-02 09:52:41 +02:00
parent f48dbe777d
commit 65795ee1f4
2 changed files with 30 additions and 0 deletions
+6
View File
@@ -1060,6 +1060,12 @@ func (w *trackingResponseWriter) Write(b []byte) (int, error) {
return w.ResponseWriter.Write(b)
}
func (w *trackingResponseWriter) Flush() {
if f, ok := w.ResponseWriter.(http.Flusher); ok {
f.Flush()
}
}
func (w *trackingResponseWriter) Unwrap() http.ResponseWriter {
return w.ResponseWriter
}