diff --git a/http2/h2demo/h2demo.go b/http2/h2demo/h2demo.go index ce842fd6b..59d9f5f68 100644 --- a/http2/h2demo/h2demo.go +++ b/http2/h2demo/h2demo.go @@ -160,6 +160,9 @@ func echoCapitalHandler(w http.ResponseWriter, r *http.Request) { http.Error(w, "PUT required.", 400) return } + if f, ok := w.(http.Flusher); ok { + f.Flush() + } io.Copy(flushWriter{w}, capitalizeReader{r.Body}) }