Merge pull request #1893 from lucas-clemente/fix-http-server-eof-reading

fix reading of the EOF in the HTTP/3 server
This commit is contained in:
Marten Seemann
2019-05-12 23:13:13 +08:00
committed by GitHub

View File

@@ -191,7 +191,7 @@ func (s *Server) handleRequest(str quic.Stream, decoder *qpack.Decoder) error {
}() }()
handler.ServeHTTP(responseWriter, req) handler.ServeHTTP(responseWriter, req)
// read the eof // read the eof
if _, err = str.Read([]byte{}); err == io.EOF { if _, err = str.Read([]byte{0}); err == io.EOF {
readEOF = true readEOF = true
} }
}() }()