Merge pull request #369 from containous/fix-hijack-logger
fix hijack logger middleware
This commit is contained in:
commit
7bf421f847
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package middlewares
|
package middlewares
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
"github.com/streamrail/concurrent-map"
|
"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 {
|
func (lirw *logInfoResponseWriter) GetStatus() int {
|
||||||
return lirw.status
|
return lirw.status
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue