]> Cypherpunks repositories - gostls13.git/commitdiff
all: update vendored golang.org/x/net
authorDmitri Shuralyov <dmitshur@golang.org>
Fri, 5 Apr 2024 22:22:10 +0000 (18:22 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 8 Apr 2024 20:51:17 +0000 (20:51 +0000)
Pull in CL 576895:

ec05fdcd http2: don't retry the first request on a connection on GOAWAY error

For #66668.
Fixes #60636.

Change-Id: I9903607e3d432a5db0325da82eb7f4b378fbddde
Reviewed-on: https://go-review.googlesource.com/c/go/+/576976
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/go.mod
src/go.sum
src/net/http/h2_bundle.go
src/vendor/modules.txt

index 862e7803b472724e68d6557bcf13e5b8f2cac5c8..f7c8f6fad0ea8cd0f81a67f85bd0121b81b2d986 100644 (file)
@@ -4,7 +4,7 @@ go 1.23
 
 require (
        golang.org/x/crypto v0.22.0
-       golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553
+       golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114
 )
 
 require (
index fef068762a0465cd6174ed95d5f0bc18d71fa4e8..d6799d4b3fdf52085f40eadc3d56acd03e2bab93 100644 (file)
@@ -1,7 +1,7 @@
 golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
 golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
-golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553 h1:SY0JWjR8cbNiMj6BwFjzJIzYd/8cIgfg1cbdMpm8g38=
-golang.org/x/net v0.24.1-0.20240405150138-b67a0f053553/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
+golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114 h1:0+DQSN4OXt0ivfKIOXFQ+8vsRb1pNvvdl7DZ6AR07OQ=
+golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
 golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
 golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
index 683d538dbc58958de97f8133c42e5156b58ebf57..5f97a27ac28b513f2223097fa29778235612e39d 100644 (file)
@@ -8338,7 +8338,20 @@ func (cc *http2ClientConn) setGoAway(f *http2GoAwayFrame) {
        }
        last := f.LastStreamID
        for streamID, cs := range cc.streams {
-               if streamID > last {
+               if streamID <= last {
+                       // The server's GOAWAY indicates that it received this stream.
+                       // It will either finish processing it, or close the connection
+                       // without doing so. Either way, leave the stream alone for now.
+                       continue
+               }
+               if streamID == 1 && cc.goAway.ErrCode != http2ErrCodeNo {
+                       // Don't retry the first stream on a connection if we get a non-NO error.
+                       // If the server is sending an error on a new connection,
+                       // retrying the request on a new one probably isn't going to work.
+                       cs.abortStreamLocked(fmt.Errorf("http2: Transport received GOAWAY from server ErrCode:%v", cc.goAway.ErrCode))
+               } else {
+                       // Aborting the stream with errClentConnGotGoAway indicates that
+                       // the request should be retried on a new connection.
                        cs.abortStreamLocked(http2errClientConnGotGoAway)
                }
        }
index f8274732d31e7d1828809514c03a51348f5652fd..19555379f6ae2b01f4063803a79e2ebd942f4e2b 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.24.1-0.20240405150138-b67a0f053553
+# golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114
 ## explicit; go 1.18
 golang.org/x/net/dns/dnsmessage
 golang.org/x/net/http/httpguts