diff options
| author | Michael Fraenkel <michael.fraenkel@gmail.com> | 2018-07-09 23:24:18 -0400 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-07-10 05:08:40 +0000 |
| commit | c78b7693abc1de4fa76d28ebf4c6ef9dcf0a68bb (patch) | |
| tree | cff92709621bf57f5d8c266c270e4185f5704058 /src/net/http | |
| parent | fd263ccefe4f1280b357cb1cb481a6599efd5f6b (diff) | |
| download | go-c78b7693abc1de4fa76d28ebf4c6ef9dcf0a68bb.tar.xz | |
net/http: update bundled http2
Updates http2 to x/net/http2 git rev 292b43b for:
http2: reject incoming HEADERS in Server on half-closed streams
https://golang.org/cl/111677
Updates #25023
Change-Id: I479ae9b5b899fb0202e6301d02535fb6aeb4997a
Reviewed-on: https://go-review.googlesource.com/122877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/h2_bundle.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go index b62459ee80..2068a0dc76 100644 --- a/src/net/http/h2_bundle.go +++ b/src/net/http/h2_bundle.go @@ -5466,6 +5466,13 @@ func (sc *http2serverConn) processHeaders(f *http2MetaHeadersFrame) error { // processing this frame. return nil } + // RFC 7540, sec 5.1: If an endpoint receives additional frames, other than + // WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in + // this state, it MUST respond with a stream error (Section 5.4.2) of + // type STREAM_CLOSED. + if st.state == http2stateHalfClosedRemote { + return http2streamError(id, http2ErrCodeStreamClosed) + } return st.processTrailerHeaders(f) } |
