feat(botfilter): add statusRecorder.Flush

This commit is contained in:
hoelee committed 2026-06-10 16:47:00 +08:00
1 parent 76379ca392
commit d5c54507b9
1 file changed
+9
+9
View File
@@ -129,3 +129,12 @@ func (r *statusRecorder) statusCode() int {
func (r *statusRecorder) Unwrap() http.ResponseWriter { return r.ResponseWriter }
func (r *statusRecorder) Flush() {
if r.status == 0 {
r.status = http.StatusOK
}
if flusher, ok := r.ResponseWriter.(http.Flusher); ok {
flusher.Flush()
}
}