make the ResponseCapture implements CloseNotify interface

This commit is contained in:
wanjunlei
2020-07-06 22:06:32 +08:00
parent ff329e1548
commit cb5f98cf97

View File

@@ -251,3 +251,8 @@ func (c *ResponseCapture) Hijack() (net.Conn, *bufio.ReadWriter, error) {
}
return hijacker.Hijack()
}
// CloseNotify is part of http.CloseNotifier interface
func (c *ResponseCapture) CloseNotify() <-chan bool {
return c.ResponseWriter.(http.CloseNotifier).CloseNotify()
}