diff options
| author | Carlos Amedee <carlos@golang.org> | 2025-06-04 15:35:31 -0400 |
|---|---|---|
| committer | Carlos Amedee <carlos@golang.org> | 2025-06-06 10:04:27 -0700 |
| commit | 78eadf5b3de568297456fe137b65ff16e8cc8bb6 (patch) | |
| tree | c014290729ff5b53e8eb38b66e202d793b138c38 /src/net/http | |
| parent | 4d1c255f159d90557b43ede07f8b9a209e1fb49c (diff) | |
| download | go-78eadf5b3de568297456fe137b65ff16e8cc8bb6.tar.xz | |
all: update vendored dependencies [generated]
The Go 1.25 RC is due soon. This is the time to once again update all
golang.org/x/... module versions that contribute packages to the std and
cmd modules in the standard library to latest master versions.
For #36905.
[git-generate]
go install golang.org/x/build/cmd/updatestd@latest
go install golang.org/x/tools/cmd/bundle@latest
updatestd -goroot=$(pwd) -branch=master
cat << EOF | patch
diff --git a/src/cmd/go/testdata/script/test_json_build.txt b/src/cmd/go/testdata/script/test_json_build.txt
index df8863ae03..2a572ace72 100644
--- a/src/cmd/go/testdata/script/test_json_build.txt
+++ b/src/cmd/go/testdata/script/test_json_build.txt
@@ -56,7 +56,7 @@ stdout '"Action":"fail","Package":"m/cycle/p","Elapsed":.*,"FailedBuild":"m/cycl
! go test -json -o=$devnull ./veterror
stdout '"ImportPath":"m/veterror \[m/veterror.test\]","Action":"build-output","Output":"# m/veterror\\n"'
stdout '"ImportPath":"m/veterror \[m/veterror.test\]","Action":"build-output","Output":"# \[m/veterror\]\\n"'
-stdout '"ImportPath":"m/veterror \[m/veterror.test\]","Action":"build-output","Output":"veterror(/|\\\\)main_test.go:9:9: fmt.Printf format %s reads arg #1, but call has 0 args\\n"'
+stdout '"ImportPath":"m/veterror \[m/veterror.test\]","Action":"build-output","Output":"veterror(/|\\\\)main_test.go:9:21: fmt.Printf format %s reads arg #1, but call has 0 args\\n"'
stdout '"ImportPath":"m/veterror \[m/veterror.test\]","Action":"build-fail"'
stdout '"Action":"start","Package":"m/veterror"'
stdout '"Action":"output","Package":"m/veterror","Output":"FAIL\\tm/veterror \[build failed\]\\n"'
EOF
Change-Id: I6a8d35acdeab90c3bbd6395b8b1abb021673b5cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/678556
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/h2_bundle.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go index a55fa8ac63..7ca0b13b3d 100644 --- a/src/net/http/h2_bundle.go +++ b/src/net/http/h2_bundle.go @@ -1608,7 +1608,7 @@ const ( http2FrameContinuation http2FrameType = 0x9 ) -var http2frameName = map[http2FrameType]string{ +var http2frameNames = [...]string{ http2FrameData: "DATA", http2FrameHeaders: "HEADERS", http2FramePriority: "PRIORITY", @@ -1622,10 +1622,10 @@ var http2frameName = map[http2FrameType]string{ } func (t http2FrameType) String() string { - if s, ok := http2frameName[t]; ok { - return s + if int(t) < len(http2frameNames) { + return http2frameNames[t] } - return fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", uint8(t)) + return fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", t) } // Flags is a bitmask of HTTP/2 flags. @@ -1693,7 +1693,7 @@ var http2flagName = map[http2FrameType]map[http2Flags]string{ // might be 0). type http2frameParser func(fc *http2frameCache, fh http2FrameHeader, countError func(string), payload []byte) (http2Frame, error) -var http2frameParsers = map[http2FrameType]http2frameParser{ +var http2frameParsers = [...]http2frameParser{ http2FrameData: http2parseDataFrame, http2FrameHeaders: http2parseHeadersFrame, http2FramePriority: http2parsePriorityFrame, @@ -1707,8 +1707,8 @@ var http2frameParsers = map[http2FrameType]http2frameParser{ } func http2typeFrameParser(t http2FrameType) http2frameParser { - if f := http2frameParsers[t]; f != nil { - return f + if int(t) < len(http2frameParsers) { + return http2frameParsers[t] } return http2parseUnknownFrame } @@ -2081,7 +2081,7 @@ func (fr *http2Framer) ReadFrame() (http2Frame, error) { } if fh.Length > fr.maxReadSize { if fh == http2invalidHTTP1LookingFrameHeader() { - return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", err) + return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", http2ErrFrameTooLarge) } return nil, http2ErrFrameTooLarge } |
