From 506f54a080ed4006676af3019d79bdee0507e4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E7=8E=89?= Date: Wed, 19 Aug 2015 15:23:50 +0800 Subject: [PATCH] Update router.go, add Flush for responseWriter --- router.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/router.go b/router.go index 217ad65f..7cce86fe 100644 --- a/router.go +++ b/router.go @@ -931,6 +931,13 @@ func (w *responseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { return hj.Hijack() } +func (w *responseWriter) Flush() { + f, ok := w.writer.(http.Flusher) + if ok { + f.Flush() + } +} + func tourl(params map[string]string) string { if len(params) == 0 { return ""