diff --git a/assets/http2/go.mod b/assets/http2/go.mod index bef89b7d8..fee58a35d 100644 --- a/assets/http2/go.mod +++ b/assets/http2/go.mod @@ -2,6 +2,6 @@ module github.com/cloudfoundry/cf-acceptance-tests/assets/http2 go 1.20 -require golang.org/x/net v0.15.0 +require golang.org/x/net v0.16.0 require golang.org/x/text v0.13.0 // indirect diff --git a/assets/http2/go.sum b/assets/http2/go.sum index e1c506e67..df13acff8 100644 --- a/assets/http2/go.sum +++ b/assets/http2/go.sum @@ -1,4 +1,4 @@ -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= diff --git a/assets/http2/vendor/golang.org/x/net/http2/server.go b/assets/http2/vendor/golang.org/x/net/http2/server.go index 6d5e00887..de60fa88f 100644 --- a/assets/http2/vendor/golang.org/x/net/http2/server.go +++ b/assets/http2/vendor/golang.org/x/net/http2/server.go @@ -1892,9 +1892,11 @@ func (st *stream) copyTrailersToHandlerRequest() { // onReadTimeout is run on its own goroutine (from time.AfterFunc) // when the stream's ReadTimeout has fired. func (st *stream) onReadTimeout() { - // Wrap the ErrDeadlineExceeded to avoid callers depending on us - // returning the bare error. - st.body.CloseWithError(fmt.Errorf("%w", os.ErrDeadlineExceeded)) + if st.body != nil { + // Wrap the ErrDeadlineExceeded to avoid callers depending on us + // returning the bare error. + st.body.CloseWithError(fmt.Errorf("%w", os.ErrDeadlineExceeded)) + } } // onWriteTimeout is run on its own goroutine (from time.AfterFunc) @@ -2012,9 +2014,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // (in Go 1.8), though. That's a more sane option anyway. if sc.hs.ReadTimeout != 0 { sc.conn.SetReadDeadline(time.Time{}) - if st.body != nil { - st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) - } + st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) } go sc.runHandler(rw, req, handler) diff --git a/assets/http2/vendor/modules.txt b/assets/http2/vendor/modules.txt index 918f7e21b..836941704 100644 --- a/assets/http2/vendor/modules.txt +++ b/assets/http2/vendor/modules.txt @@ -1,4 +1,4 @@ -# golang.org/x/net v0.15.0 +# golang.org/x/net v0.16.0 ## explicit; go 1.17 golang.org/x/net/http/httpguts golang.org/x/net/http2