mirror of
https://github.com/golang/net.git
synced 2026-03-31 02:17:08 +09:00
When HTTP2Config.StrictMaxConcurrentRequests is set (added in Go 1.26), use it to override the value of Transport.StrictMaxConcurrentStreams. Permits configuring this parameter from net/http without importing x/net/http2. For golang/go#67813 Change-Id: Ie7fa5a8ac033b1827cf7fef4e23b5110a05dc95f Reviewed-on: https://go-review.googlesource.com/c/net/+/707315 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
16 lines
332 B
Go
16 lines
332 B
Go
// Copyright 2025 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build go1.26
|
|
|
|
package http2
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func http2ConfigStrictMaxConcurrentRequests(h2 *http.HTTP2Config) bool {
|
|
return h2.StrictMaxConcurrentRequests
|
|
}
|