From 65923b35f5456b939a907b4a4ecd45ac22c7ec99 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Tue, 2 May 2017 00:13:14 -0600 Subject: [PATCH] Make responseWriter a CloseNotifier This is a temporary no-op that returns a new channel; eventually it'd be nice if this worked for real. --- h2quic/response_writer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/h2quic/response_writer.go b/h2quic/response_writer.go index 0f043890..d38555a4 100644 --- a/h2quic/response_writer.go +++ b/h2quic/response_writer.go @@ -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.