From b658265012e6f7213c12bb653107843475e26837 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 5 Jun 2024 09:26:29 -0700 Subject: [PATCH] net/http: use default HTTP/2 frame scheduler Use the default frame scheduler (currently round-robin) rather than overriding the default with the priority scheduler. The priority scheduler is slow, known buggy, and implements a deprecated stream prioritization mechanism. The default changed in x/net about a year ago, but we missed that net/http is overriding that default. Fixes #67706 Change-Id: I6d76dd0cc8c55eb5dec5cd7d25a5084877e8e8d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/590796 LUCI-TryBot-Result: Go LUCI Reviewed-by: Jonathan Amsterdam Auto-Submit: Damien Neil --- src/net/http/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/net/http/server.go b/src/net/http/server.go index e28b107e993..9deb308e8a5 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -3598,9 +3598,7 @@ func (srv *Server) onceSetNextProtoDefaults() { // Enable HTTP/2 by default if the user hasn't otherwise // configured their TLSNextProto map. if srv.TLSNextProto == nil { - conf := &http2Server{ - NewWriteScheduler: func() http2WriteScheduler { return http2NewPriorityWriteScheduler(nil) }, - } + conf := &http2Server{} srv.nextProtoErr = http2ConfigureServer(srv, conf) } }