From baf1ea3ac05f8c36b56c5f3ca779f14b577444ac Mon Sep 17 00:00:00 2001 From: Ian Rees Date: Fri, 8 May 2026 18:34:50 -0700 Subject: [PATCH] add Unrwap() --- lmw.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lmw.go b/lmw.go index 2a8eaba..2a2b7d6 100644 --- a/lmw.go +++ b/lmw.go @@ -131,3 +131,10 @@ func (rw *responseWriter) Write(response []byte) (int, error) { rw.size += int64(n) return n, err } + +// Unwrap exposes the underlying writer so http.ResponseController can navigate +// past this wrapper to find Flusher / Hijacker / etc. on the original writer. +// Without this, SSE handlers downstream lose Flush() and can't stream. +func (rw *responseWriter) Unwrap() http.ResponseWriter { + return rw.ResponseWriter +}