From eb4d3ec6275347ca59f208234495f610fc9e747c Mon Sep 17 00:00:00 2001 From: hoelee Date: Tue, 9 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) +} +