mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-01 04:41:02 +00:00
[chore]: Bump golang.org/x/net from 0.16.0 to 0.17.0 (#2262)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
37fe8aea49
commit
39e22a9703
4 changed files with 68 additions and 6 deletions
2
go.mod
2
go.mod
|
@ -63,7 +63,7 @@ require (
|
||||||
golang.org/x/crypto v0.14.0
|
golang.org/x/crypto v0.14.0
|
||||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
|
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
|
||||||
golang.org/x/image v0.13.0
|
golang.org/x/image v0.13.0
|
||||||
golang.org/x/net v0.16.0
|
golang.org/x/net v0.17.0
|
||||||
golang.org/x/oauth2 v0.13.0
|
golang.org/x/oauth2 v0.13.0
|
||||||
golang.org/x/text v0.13.0
|
golang.org/x/text v0.13.0
|
||||||
gopkg.in/mcuadros/go-syslog.v2 v2.3.0
|
gopkg.in/mcuadros/go-syslog.v2 v2.3.0
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -753,8 +753,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos=
|
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||||
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
|
66
vendor/golang.org/x/net/http2/server.go
generated
vendored
66
vendor/golang.org/x/net/http2/server.go
generated
vendored
|
@ -581,9 +581,11 @@ type serverConn struct {
|
||||||
advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client
|
advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client
|
||||||
curClientStreams uint32 // number of open streams initiated by the client
|
curClientStreams uint32 // number of open streams initiated by the client
|
||||||
curPushedStreams uint32 // number of open streams initiated by server push
|
curPushedStreams uint32 // number of open streams initiated by server push
|
||||||
|
curHandlers uint32 // number of running handler goroutines
|
||||||
maxClientStreamID uint32 // max ever seen from client (odd), or 0 if there have been no client requests
|
maxClientStreamID uint32 // max ever seen from client (odd), or 0 if there have been no client requests
|
||||||
maxPushPromiseID uint32 // ID of the last push promise (even), or 0 if there have been no pushes
|
maxPushPromiseID uint32 // ID of the last push promise (even), or 0 if there have been no pushes
|
||||||
streams map[uint32]*stream
|
streams map[uint32]*stream
|
||||||
|
unstartedHandlers []unstartedHandler
|
||||||
initialStreamSendWindowSize int32
|
initialStreamSendWindowSize int32
|
||||||
maxFrameSize int32
|
maxFrameSize int32
|
||||||
peerMaxHeaderListSize uint32 // zero means unknown (default)
|
peerMaxHeaderListSize uint32 // zero means unknown (default)
|
||||||
|
@ -981,6 +983,8 @@ func (sc *serverConn) serve() {
|
||||||
return
|
return
|
||||||
case gracefulShutdownMsg:
|
case gracefulShutdownMsg:
|
||||||
sc.startGracefulShutdownInternal()
|
sc.startGracefulShutdownInternal()
|
||||||
|
case handlerDoneMsg:
|
||||||
|
sc.handlerDone()
|
||||||
default:
|
default:
|
||||||
panic("unknown timer")
|
panic("unknown timer")
|
||||||
}
|
}
|
||||||
|
@ -1020,6 +1024,7 @@ var (
|
||||||
idleTimerMsg = new(serverMessage)
|
idleTimerMsg = new(serverMessage)
|
||||||
shutdownTimerMsg = new(serverMessage)
|
shutdownTimerMsg = new(serverMessage)
|
||||||
gracefulShutdownMsg = new(serverMessage)
|
gracefulShutdownMsg = new(serverMessage)
|
||||||
|
handlerDoneMsg = new(serverMessage)
|
||||||
)
|
)
|
||||||
|
|
||||||
func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }
|
func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }
|
||||||
|
@ -2017,8 +2022,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
|
||||||
st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
|
st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
go sc.runHandler(rw, req, handler)
|
return sc.scheduleHandler(id, rw, req, handler)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sc *serverConn) upgradeRequest(req *http.Request) {
|
func (sc *serverConn) upgradeRequest(req *http.Request) {
|
||||||
|
@ -2038,6 +2042,10 @@ func (sc *serverConn) upgradeRequest(req *http.Request) {
|
||||||
sc.conn.SetReadDeadline(time.Time{})
|
sc.conn.SetReadDeadline(time.Time{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is the first request on the connection,
|
||||||
|
// so start the handler directly rather than going
|
||||||
|
// through scheduleHandler.
|
||||||
|
sc.curHandlers++
|
||||||
go sc.runHandler(rw, req, sc.handler.ServeHTTP)
|
go sc.runHandler(rw, req, sc.handler.ServeHTTP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2278,8 +2286,62 @@ func (sc *serverConn) newResponseWriter(st *stream, req *http.Request) *response
|
||||||
return &responseWriter{rws: rws}
|
return &responseWriter{rws: rws}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type unstartedHandler struct {
|
||||||
|
streamID uint32
|
||||||
|
rw *responseWriter
|
||||||
|
req *http.Request
|
||||||
|
handler func(http.ResponseWriter, *http.Request)
|
||||||
|
}
|
||||||
|
|
||||||
|
// scheduleHandler starts a handler goroutine,
|
||||||
|
// or schedules one to start as soon as an existing handler finishes.
|
||||||
|
func (sc *serverConn) scheduleHandler(streamID uint32, rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) error {
|
||||||
|
sc.serveG.check()
|
||||||
|
maxHandlers := sc.advMaxStreams
|
||||||
|
if sc.curHandlers < maxHandlers {
|
||||||
|
sc.curHandlers++
|
||||||
|
go sc.runHandler(rw, req, handler)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if len(sc.unstartedHandlers) > int(4*sc.advMaxStreams) {
|
||||||
|
return sc.countError("too_many_early_resets", ConnectionError(ErrCodeEnhanceYourCalm))
|
||||||
|
}
|
||||||
|
sc.unstartedHandlers = append(sc.unstartedHandlers, unstartedHandler{
|
||||||
|
streamID: streamID,
|
||||||
|
rw: rw,
|
||||||
|
req: req,
|
||||||
|
handler: handler,
|
||||||
|
})
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sc *serverConn) handlerDone() {
|
||||||
|
sc.serveG.check()
|
||||||
|
sc.curHandlers--
|
||||||
|
i := 0
|
||||||
|
maxHandlers := sc.advMaxStreams
|
||||||
|
for ; i < len(sc.unstartedHandlers); i++ {
|
||||||
|
u := sc.unstartedHandlers[i]
|
||||||
|
if sc.streams[u.streamID] == nil {
|
||||||
|
// This stream was reset before its goroutine had a chance to start.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if sc.curHandlers >= maxHandlers {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
sc.curHandlers++
|
||||||
|
go sc.runHandler(u.rw, u.req, u.handler)
|
||||||
|
sc.unstartedHandlers[i] = unstartedHandler{} // don't retain references
|
||||||
|
}
|
||||||
|
sc.unstartedHandlers = sc.unstartedHandlers[i:]
|
||||||
|
if len(sc.unstartedHandlers) == 0 {
|
||||||
|
sc.unstartedHandlers = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Run on its own goroutine.
|
// Run on its own goroutine.
|
||||||
func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {
|
func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) {
|
||||||
|
defer sc.sendServeMsg(handlerDoneMsg)
|
||||||
didPanic := true
|
didPanic := true
|
||||||
defer func() {
|
defer func() {
|
||||||
rw.rws.stream.cancelCtx()
|
rw.rws.stream.cancelCtx()
|
||||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -852,7 +852,7 @@ golang.org/x/image/webp
|
||||||
# golang.org/x/mod v0.12.0
|
# golang.org/x/mod v0.12.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/mod/semver
|
golang.org/x/mod/semver
|
||||||
# golang.org/x/net v0.16.0
|
# golang.org/x/net v0.17.0
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
golang.org/x/net/bpf
|
golang.org/x/net/bpf
|
||||||
golang.org/x/net/context
|
golang.org/x/net/context
|
||||||
|
|
Loading…
Reference in a new issue