feat(botfilter): add statusRecorder.Hijack

This commit is contained in:
hoelee committed 2026-06-11 17:54:00 +08:00
1 parent d5c54507b9
commit 6d08794100
1 file changed
+8
+8
View File
@@ -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()
}