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() +} +