Merge pull request #584 from mholt/patch-1

Make responseWriter a CloseNotifier
This commit is contained in:
Lucas Clemente
2017-05-02 08:37:03 +02:00
committed by GitHub

View File

@@ -83,9 +83,15 @@ func (w *responseWriter) Write(p []byte) (int, error) {
func (w *responseWriter) Flush() {}
// TODO: Implement a functional CloseNotify method.
func (w *responseWriter) CloseNotify() <-chan bool { return make(<-chan bool) }
// test that we implement http.Flusher
var _ http.Flusher = &responseWriter{}
// test that we implement http.CloseNotifier
var _ http.CloseNotifier = &responseWriter{}
// copied from http2/http2.go
// bodyAllowedForStatus reports whether a given response status code
// permits a body. See RFC 2616, section 4.4.