Skip to content

Commit

Permalink
Implement Flusher in responseWriter wrapper (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfloyd authored and Aaron Hurt committed May 6, 2019
1 parent b11536b commit 6862237
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proxy/http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ func (rw *responseWriter) WriteHeader(statusCode int) {
rw.code = statusCode
}

func (rw *responseWriter) Flush() {
if fl, ok := rw.w.(http.Flusher); ok {
fl.Flush()
}
}

var errNoHijacker = errors.New("not a hijacker")

func (rw *responseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
Expand Down

0 comments on commit 6862237

Please sign in to comment.