mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: golang.org/x/net v0.10.0
- http2: properly discard data received after request/response body is closed - http2: don't reuse connections that are experiencing errors - internal/socks: permit authenticating with an empty password full diff: https://github.com/golang/net/compare/v0.8.0...v0.10.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
7
vendor/golang.org/x/net/http2/server.go
generated
vendored
7
vendor/golang.org/x/net/http2/server.go
generated
vendored
@ -1822,15 +1822,18 @@ func (sc *serverConn) processData(f *DataFrame) error {
|
||||
}
|
||||
|
||||
if len(data) > 0 {
|
||||
st.bodyBytes += int64(len(data))
|
||||
wrote, err := st.body.Write(data)
|
||||
if err != nil {
|
||||
// The handler has closed the request body.
|
||||
// Return the connection-level flow control for the discarded data,
|
||||
// but not the stream-level flow control.
|
||||
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
|
||||
return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
|
||||
return nil
|
||||
}
|
||||
if wrote != len(data) {
|
||||
panic("internal error: bad Writer")
|
||||
}
|
||||
st.bodyBytes += int64(len(data))
|
||||
}
|
||||
|
||||
// Return any padded flow control now, since we won't
|
||||
|
Reference in New Issue
Block a user