From d5d5c04a3dc78b9351936eb6052c3fa19706c11f Mon Sep 17 00:00:00 2001 From: hoelee Date: Mon, 1 Jun 2026 16:47:00 +0800 Subject: [PATCH] feat(botfilter): add statusRecorder.Write --- botfilter.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/botfilter.go b/botfilter.go index 1c5b2a90..e30efc67 100644 --- a/botfilter.go +++ b/botfilter.go @@ -113,3 +113,10 @@ func (r *statusRecorder) WriteHeader(status int) { r.ResponseWriter.WriteHeader(status) } +func (r *statusRecorder) Write(data []byte) (int, error) { + if r.status == 0 { + r.status = http.StatusOK + } + return r.ResponseWriter.Write(data) +} +