From cb0c1d34a2675f56aee77a2ab0c1260424cd7dda Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Thu, 12 May 2016 16:32:12 +0200 Subject: [PATCH] fix hijack logger middleware Signed-off-by: Emile Vauge --- middlewares/logger.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/middlewares/logger.go b/middlewares/logger.go index 7875cd964..5addd91e0 100644 --- a/middlewares/logger.go +++ b/middlewares/logger.go @@ -1,6 +1,7 @@ package middlewares import ( + "bufio" "fmt" log "github.com/Sirupsen/logrus" "github.com/streamrail/concurrent-map" @@ -167,6 +168,10 @@ func (lirw *logInfoResponseWriter) Flush() { } } +func (lirw *logInfoResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { + return lirw.rw.(http.Hijacker).Hijack() +} + func (lirw *logInfoResponseWriter) GetStatus() int { return lirw.status }