From 6d087941004a83aa1e896c4be556300fb3b30184 Mon Sep 17 00:00:00 2001 From: hoelee Date: Thu, 11 Jun 2026 17:54:00 +0800 Subject: [PATCH] feat(botfilter): add statusRecorder.Hijack --- botfilter.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/botfilter.go b/botfilter.go index 8318ca7e..2a257261 100644 --- a/botfilter.go +++ b/botfilter.go @@ -138,3 +138,11 @@ func (r *statusRecorder) Flush() { } } +func (r *statusRecorder) Hijack() (net.Conn, *bufio.ReadWriter, error) { + hijacker, ok := r.ResponseWriter.(http.Hijacker) + if !ok { + return nil, nil, http.ErrNotSupported + } + return hijacker.Hijack() +} +