]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: update bundled x/net/http2
authorAndy Pan <i@andypan.me>
Thu, 21 Mar 2024 12:59:39 +0000 (12:59 +0000)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Mon, 25 Mar 2024 09:37:46 +0000 (09:37 +0000)
Keep ReadTimeout, ReadHeaderTimeout, IdleTimeout and WriteTimeout in sync

Change-Id: I32b43884c0078eca86f20ec363f1d702ba298d1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/573315
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/go.mod
src/go.sum
src/net/http/h2_bundle.go
src/vendor/modules.txt

index 521857564309d40354ea123cc5668f01262f4841..a6551ffabe7a4695247adbe8bf25b3c4b288e694 100644 (file)
@@ -4,7 +4,7 @@ go 1.23
 
 require (
        golang.org/x/crypto v0.21.0
-       golang.org/x/net v0.22.1-0.20240319212107-89f602b7bbf2
+       golang.org/x/net v0.22.1-0.20240320112724-d73acffdc949
 )
 
 require (
index 034ae76a4cbf27640e5bae5f1a526c43323e7aa8..2849ffd78f00b01ee2848cf6443b435cdf4daab8 100644 (file)
@@ -1,7 +1,7 @@
 golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
 golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
-golang.org/x/net v0.22.1-0.20240319212107-89f602b7bbf2 h1:WNITMhTVrtUfe9GkWjUUqAD70V3VRB6IN+LNLoQIzhw=
-golang.org/x/net v0.22.1-0.20240319212107-89f602b7bbf2/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
+golang.org/x/net v0.22.1-0.20240320112724-d73acffdc949 h1:I5WNFtVW5hWIoi/wTQJWBBusF9HXZuGCgRt60a7T/pA=
+golang.org/x/net v0.22.1-0.20240320112724-d73acffdc949/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
 golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
 golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
index 168405e15fe9d7dc86a216b6416fbed9beb5dc22..af839dd1bfd2b9ab8e9dfaf5f6a93213dc528690 100644 (file)
@@ -3916,6 +3916,7 @@ type http2Server struct {
        // IdleTimeout specifies how long until idle clients should be
        // closed with a GOAWAY frame. PING frames are not considered
        // activity for the purposes of IdleTimeout.
+       // If zero or negative, there is no timeout.
        IdleTimeout time.Duration
 
        // MaxUploadBufferPerConnection is the size of the initial flow
@@ -4719,7 +4720,7 @@ func (sc *http2serverConn) serve() {
        sc.setConnState(StateActive)
        sc.setConnState(StateIdle)
 
-       if sc.srv.IdleTimeout != 0 {
+       if sc.srv.IdleTimeout > 0 {
                sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
                defer sc.idleTimer.Stop()
        }
@@ -5434,7 +5435,7 @@ func (sc *http2serverConn) closeStream(st *http2stream, err error) {
        delete(sc.streams, st.id)
        if len(sc.streams) == 0 {
                sc.setConnState(StateIdle)
-               if sc.srv.IdleTimeout != 0 {
+               if sc.srv.IdleTimeout > 0 {
                        sc.idleTimer.Reset(sc.srv.IdleTimeout)
                }
                if http2h1ServerKeepAlivesDisabled(sc.hs) {
index a0042a9a6db8c0ca26a784a3207701e9eb4b5c33..9982c93f776260604f5ed499f0df256bcf1a63f2 100644 (file)
@@ -7,7 +7,7 @@ golang.org/x/crypto/cryptobyte/asn1
 golang.org/x/crypto/hkdf
 golang.org/x/crypto/internal/alias
 golang.org/x/crypto/internal/poly1305
-# golang.org/x/net v0.22.1-0.20240319212107-89f602b7bbf2
+# golang.org/x/net v0.22.1-0.20240320112724-d73acffdc949
 ## explicit; go 1.18
 golang.org/x/net/dns/dnsmessage
 golang.org/x/net/http/httpguts