Skip to content

Commit

Permalink
Fixes molnarg#107: Allow frames after RST_STREAM.
Browse files Browse the repository at this point in the history
Prevent exceptions for the common case in which the serving endpoint
sends frames after the RST_STREAM has been sent from the client
endpoint. Often frames are enqueued prior to the arrival of the
RST_STREAM, but sent after. This should be expected based on HTTP/2
spec, section 6.4.

https://http2.github.io/http2-spec/#rfc.section.6.4

"However, after sending the RST_STREAM, the sending endpoint MUST be
prepared to receive and process additional frames sent on the stream
that might have been sent by the peer prior to the arrival of the
RST_STREAM."
  • Loading branch information
adamhenson authored and singhnitesh committed Nov 15, 2016
1 parent c90d450 commit 5f98422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/protocol/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ Stream.prototype._transition = function transition(sending, frame) {
// can be used to close any of those streams.
case 'CLOSED':
if (PRIORITY || (sending && RST_STREAM) ||
(sending && this._closedWithRst) ||
(receiving && WINDOW_UPDATE) ||
(receiving && this._closedByUs &&
(this._closedWithRst || RST_STREAM || ALTSVC))) {
Expand Down

0 comments on commit 5f98422

Please sign in to comment.