aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorNicholas S. Husin <nsh@golang.org>2026-01-22 16:29:18 -0500
committerNicholas Husin <nsh@golang.org>2026-01-22 14:02:25 -0800
commite0c4ad77cf0f11687f72a361dff76713e5541b7f (patch)
tree5e070644a43b84bf65f4a4d62a04e11f74244c2d /src/net/http
parentdd39dfb534d2badf1bb2d72d98bb13cad991fda2 (diff)
downloadgo-e0c4ad77cf0f11687f72a361dff76713e5541b7f.tar.xz
net/http: Add Server.DisableClientPriority field
The DisableClientPriority field is currently still a no-op, and will only take effect once golang.org/x/net is bundled up into h2_bundle.go again. For #75500 Change-Id: I9e2135bed50b7f201aea93467e3f5f5f6c81cb1c Reviewed-on: https://go-review.googlesource.com/c/go/+/738620 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/server.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go
index 406d2a8407..a388777d3a 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -3074,6 +3074,17 @@ type Server struct {
// the default is HTTP/1 only.
Protocols *Protocols
+ // DisableClientPriority specifies whether client-specified priority, as
+ // specified in RFC 9218, should be respected or not.
+ //
+ // This field only takes effect if using HTTP/2, and if no custom write
+ // scheduler is defined for the HTTP/2 server. Otherwise, this field is a
+ // no-op.
+ //
+ // If set to true, requests will be served in a round-robin manner, without
+ // prioritization.
+ DisableClientPriority bool
+
inShutdown atomic.Bool // true when server is in shutdown
disableKeepAlives atomic.Bool