mirror of
https://github.com/golang/go.git
synced 2026-01-29 07:02:05 +03:00
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>
This commit is contained in:
committed by
Nicholas Husin
parent
dd39dfb534
commit
e0c4ad77cf
1
api/next/75500.txt
Normal file
1
api/next/75500.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
pkg net/http, type Server struct, DisableClientPriority bool #75500
|
||||||
4
doc/next/6-stdlib/99-minor/net/http/75500.md
Normal file
4
doc/next/6-stdlib/99-minor/net/http/75500.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
HTTP/2 server now accepts client priority signals, as defined in RFC 9218,
|
||||||
|
allowing it to prioritize serving HTTP/2 streams with higher priority. If the
|
||||||
|
old behavior is preferred, where streams are served in a round-robin manner
|
||||||
|
regardless of priority, [Server.DisableClientPriority] can be set to `true`.
|
||||||
@@ -3074,6 +3074,17 @@ type Server struct {
|
|||||||
// the default is HTTP/1 only.
|
// the default is HTTP/1 only.
|
||||||
Protocols *Protocols
|
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
|
inShutdown atomic.Bool // true when server is in shutdown
|
||||||
|
|
||||||
disableKeepAlives atomic.Bool
|
disableKeepAlives atomic.Bool
|
||||||
|
|||||||
Reference in New Issue
Block a user