]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.18] net/http: update bundled golang.org/x/net/http2
authorDamien Neil <dneil@google.com>
Mon, 22 Aug 2022 23:21:02 +0000 (16:21 -0700)
committerMichael Knyszek <mknyszek@google.com>
Tue, 6 Sep 2022 15:49:18 +0000 (15:49 +0000)
Disable cmd/internal/moddeps test, since this update includes PRIVATE
track fixes.

Fixes CVE-2022-27664
Fixes #53977
For #54658.

Change-Id: I84b0b8f61e49e15ef55ef8d738730107a3cf849b
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1554415
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/428635
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/cmd/internal/moddeps/moddeps_test.go
src/net/http/h2_bundle.go

index 56c3b2585c7fdc211a0c4e17827bf182eb938661..3306e29431cdca695dff81b62b9e8f9369baccdf 100644 (file)
@@ -34,6 +34,8 @@ import (
 // See issues 36852, 41409, and 43687.
 // (Also see golang.org/issue/27348.)
 func TestAllDependencies(t *testing.T) {
+       t.Skip("TODO(#53977): 1.18.5 contains unreleased changes from vendored modules")
+
        goBin := testenv.GoToolPath(t)
 
        // Ensure that all packages imported within GOROOT
index bb82f2458589d83c3b03bb5351d3bfdd8f111772..1e78f6cdb935c0db48d1cb350501254f0405a454 100644 (file)
@@ -3384,10 +3384,11 @@ func (s http2SettingID) String() string {
 // name (key). See httpguts.ValidHeaderName for the base rules.
 //
 // Further, http2 says:
-//   "Just as in HTTP/1.x, header field names are strings of ASCII
-//   characters that are compared in a case-insensitive
-//   fashion. However, header field names MUST be converted to
-//   lowercase prior to their encoding in HTTP/2. "
+//
+//     "Just as in HTTP/1.x, header field names are strings of ASCII
+//     characters that are compared in a case-insensitive
+//     fashion. However, header field names MUST be converted to
+//     lowercase prior to their encoding in HTTP/2. "
 func http2validWireHeaderFieldName(v string) bool {
        if len(v) == 0 {
                return false
@@ -3578,8 +3579,8 @@ func (s *http2sorter) SortStrings(ss []string) {
 // validPseudoPath reports whether v is a valid :path pseudo-header
 // value. It must be either:
 //
-//     *) a non-empty string starting with '/'
-//     *) the string '*', for OPTIONS requests.
+//     *) a non-empty string starting with '/'
+//     *) the string '*', for OPTIONS requests.
 //
 // For now this is only used a quick check for deciding when to clean
 // up Opaque URLs before sending requests from the Transport.
@@ -5053,6 +5054,9 @@ func (sc *http2serverConn) startGracefulShutdownInternal() {
 func (sc *http2serverConn) goAway(code http2ErrCode) {
        sc.serveG.check()
        if sc.inGoAway {
+               if sc.goAwayCode == http2ErrCodeNo {
+                       sc.goAwayCode = code
+               }
                return
        }
        sc.inGoAway = true
@@ -6265,8 +6269,9 @@ func (rws *http2responseWriterState) writeChunk(p []byte) (n int, err error) {
 // prior to the headers being written. If the set of trailers is fixed
 // or known before the header is written, the normal Go trailers mechanism
 // is preferred:
-//    https://golang.org/pkg/net/http/#ResponseWriter
-//    https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
+//
+//     https://golang.org/pkg/net/http/#ResponseWriter
+//     https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
 const http2TrailerPrefix = "Trailer:"
 
 // promoteUndeclaredTrailers permits http.Handlers to set trailers