testable
This commit is contained in:
@@ -191,3 +191,11 @@ func (s *statusRecorder) WriteHeader(code int) {
|
||||
s.ResponseWriter.WriteHeader(code)
|
||||
}
|
||||
|
||||
// Flush delegates so SSE handlers can still call w.(http.Flusher).Flush()
|
||||
// after the Logger middleware wraps the original ResponseWriter.
|
||||
func (s *statusRecorder) Flush() {
|
||||
if f, ok := s.ResponseWriter.(http.Flusher); ok {
|
||||
f.Flush()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user