Skip to content

Receiving a RST_STREAM on a pushed stream causes a crash #107

Open
@nwgh

Description

@nwgh
/Users/hurley/src/node-http2/lib/protocol/stream.js:627
      throw new Error('Sending illegal frame (' + frame.type + ') in ' + this.
            ^
Error: Sending illegal frame (DATA) in CLOSED state.
    at Stream.transition [as _transition] (/Users/hurley/src/node-http2/lib/protocol/stream.js:627:13)
    at Stream._pushUpstream (/Users/hurley/src/node-http2/lib/protocol/stream.js:230:8)
    at Stream._finishing (/Users/hurley/src/node-http2/lib/protocol/stream.js:351:10)
    at Stream.emit (events.js:104:17)
    at finishMaybe (_stream_writable.js:484:14)
    at endWritable (_stream_writable.js:493:3)
    at Stream.Writable.end (_stream_writable.js:459:5)
    at OutgoingResponse._finish (/Users/hurley/src/node-http2/lib/http.js:348:17)
    at OutgoingResponse.emit (events.js:129:20)
    at finishMaybe (_stream_writable.js:484:14)

This happens when Firefox refuses a pushed stream (using RST_STREAM), either because of configuration (disabling network.http.spdy.allow-push) or because of a bug in firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1127618). Presumably, this happens with any other UA that refuses pushes in a similar fashion.

My first suspicion is that there's a race between receipt of the RST_STREAM (which sets the stream state to CLOSED) and stopping sending of data on the pushed stream that causes us to hit this state, but I have to investigate further to be sure.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions