Move ResponseWriter Conn and TLS methods to Request

This commit is contained in:
Adnan Maolood
2021-02-24 08:24:47 -05:00
parent b488146cc6
commit de339490f4
3 changed files with 19 additions and 21 deletions

View File

@@ -360,13 +360,13 @@ func (srv *Server) serveConn(ctx context.Context, conn net.Conn) error {
}
w := newResponseWriter(cw)
w.conn = conn
req, err := ReadRequest(r)
if err != nil {
w.WriteHeader(StatusBadRequest, "Bad request")
return w.Flush()
}
req.conn = conn
h := srv.Handler
if h == nil {