FlushError will suppress actual flushing if the response is buffered. See: https://github.com/caddyserver/caddy/issues/6144
()
| 239 | // FlushError will suppress actual flushing if the response is buffered. See: |
| 240 | // https://github.com/caddyserver/caddy/issues/6144 |
| 241 | func (rr *responseRecorder) FlushError() error { |
| 242 | if rr.stream { |
| 243 | //nolint:bodyclose |
| 244 | return http.NewResponseController(rr.ResponseWriterWrapper).Flush() |
| 245 | } |
| 246 | return nil |
| 247 | } |
| 248 | |
| 249 | // Private interface so it can only be used in this package |
| 250 | // #TODO: maybe export it later |