use a buffered writer for the http3 response writer

This commit is contained in:
Marten Seemann
2020-03-27 08:42:35 +07:00
parent c10af76a4a
commit 683230372e
5 changed files with 19 additions and 10 deletions

View File

@@ -270,6 +270,7 @@ func (s *Server) handleRequest(sess quic.Session, str quic.Stream, decoder *qpac
ctx = context.WithValue(ctx, http.LocalAddrContextKey, sess.LocalAddr())
req = req.WithContext(ctx)
responseWriter := newResponseWriter(str, s.logger)
defer responseWriter.Flush()
handler := s.Handler
if handler == nil {
handler = http.DefaultServeMux