mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 14:39:57 +00:00
TUN-5547: Bump golang x/net package to fix http2 transport bugs
This commit is contained in:
10
vendor/golang.org/x/net/http2/server.go
generated
vendored
10
vendor/golang.org/x/net/http2/server.go
generated
vendored
@@ -719,7 +719,15 @@ func (sc *serverConn) canonicalHeader(v string) string {
|
||||
sc.canonHeader = make(map[string]string)
|
||||
}
|
||||
cv = http.CanonicalHeaderKey(v)
|
||||
sc.canonHeader[v] = cv
|
||||
// maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of
|
||||
// entries in the canonHeader cache. This should be larger than the number
|
||||
// of unique, uncommon header keys likely to be sent by the peer, while not
|
||||
// so high as to permit unreasonable memory usage if the peer sends an unbounded
|
||||
// number of unique header keys.
|
||||
const maxCachedCanonicalHeaders = 32
|
||||
if len(sc.canonHeader) < maxCachedCanonicalHeaders {
|
||||
sc.canonHeader[v] = cv
|
||||
}
|
||||
return cv
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user