Skip to content

Commit

Permalink
Implement http.CloseNotifier interface for gzipResponseWriter
Browse files Browse the repository at this point in the history
This seems to have been an oversight since all of the response writers
are supposed to implement this interface, but the gzipResponseWriter
didn't implement this interface for some reason.
  • Loading branch information
jsternberg committed Mar 15, 2016
1 parent 1db7c9e commit 6dd78e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/httpd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,10 @@ func (w gzipResponseWriter) Flush() {
w.Writer.(*gzip.Writer).Flush()
}

func (w gzipResponseWriter) CloseNotify() <-chan bool {
return w.ResponseWriter.(http.CloseNotifier).CloseNotify()
}

// determines if the client can accept compressed responses, and encodes accordingly
func gzipFilter(inner http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 6dd78e4

Please sign in to comment.