1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:00:06 -07:00

net/http: update bundled http2

Updates bundled http2 to x/net git rev ed066c81e7 for:

    http2: Revert a closed stream cannot receive data
    https://golang.org/cl/153977

Updates golang/go#28204

Change-Id: I0a489e4e8a581a107970199f64f0fa9281982efe
Reviewed-on: https://go-review.googlesource.com/c/159179
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Brad Fitzpatrick 2019-01-23 20:35:37 +00:00
parent 829c5df586
commit 1e450aa2f2

View File

@ -4852,7 +4852,7 @@ func (sc *http2serverConn) resetStream(se http2StreamError) {
// processFrameFromReader processes the serve loop's read from readFrameCh from the // processFrameFromReader processes the serve loop's read from readFrameCh from the
// frame-reading goroutine. // frame-reading goroutine.
// processFrameFromReader reports whether the connection should be kept open. // processFrameFromReader returns whether the connection should be kept open.
func (sc *http2serverConn) processFrameFromReader(res http2readFrameResult) bool { func (sc *http2serverConn) processFrameFromReader(res http2readFrameResult) bool {
sc.serveG.check() sc.serveG.check()
err := res.err err := res.err
@ -5157,12 +5157,6 @@ func (sc *http2serverConn) processData(f *http2DataFrame) error {
// type PROTOCOL_ERROR." // type PROTOCOL_ERROR."
return http2ConnectionError(http2ErrCodeProtocol) return http2ConnectionError(http2ErrCodeProtocol)
} }
// RFC 7540, sec 6.1: If a DATA frame is received whose stream is not in
// "open" or "half-closed (local)" state, the recipient MUST respond with a
// stream error (Section 5.4.2) of type STREAM_CLOSED.
if state == http2stateClosed {
return http2streamError(id, http2ErrCodeStreamClosed)
}
if st == nil || state != http2stateOpen || st.gotTrailerHeader || st.resetQueued { if st == nil || state != http2stateOpen || st.gotTrailerHeader || st.resetQueued {
// This includes sending a RST_STREAM if the stream is // This includes sending a RST_STREAM if the stream is
// in stateHalfClosedLocal (which currently means that // in stateHalfClosedLocal (which currently means that