feat(botfilter): add statusRecorder.Hijack
This commit is contained in:
1 parent
3d59734b8d
commit
9b61040eee
1 file changed
+8
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user