GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — New local streams can still be created after receiving GOAWAY · Issue #17441 · netty/netty Open DescriptionSummary
Standard RequirementOfficial standard: RFC 9113 Section 6.8
Relevant Source Code
void onGoAwayRead0(ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData) throws Http2Exception { listener.onGoAwayRead(ctx, lastStreamId, errorCode, debugData); connection.goAwayReceived(lastStreamId, errorCode, debugData); } On receiving GOAWAY, the connection records
public void goAwayReceived(final int lastKnownStream, long errorCode, ByteBuf debugData) throws Http2Exception { if (localEndpoint.lastStreamKnownByPeer() >= 0 && localEndpoint.lastStreamKnownByPeer() < lastKnownStream) { throw connectionError(PROTOCOL_ERROR, "lastStreamId MUST NOT increase. Current value: %d new value: %d", localEndpoint.lastStreamKnownByPeer(), lastKnownStream); } localEndpoint.lastStreamKnownByPeer(lastKnownStream); ... closeStreamsGreaterThanLastKnownStreamId(lastKnownStream, localEndpoint); }
public DefaultStream createStream(int streamId, boolean halfClosed) throws Http2Exception { State state = activeState(streamId, IDLE, isLocal(), halfClosed); checkNewStreamAllowed(streamId, state); lastCreatedStreamIdentity++; DefaultStream stream = new DefaultStream(lastCreatedStreamIdentity, streamId, state); incrementExpectedStreamId(streamId);
private void checkNewStreamAllowed(int streamId, State state) throws Http2Exception { assert state != IDLE; if (lastStreamKnownByPeer >= 0 && streamId > lastStreamKnownByPeer) { throw streamError(streamId, REFUSED_STREAM, "Cannot create stream %d greater than Last-Stream-ID %d from GOAWAY.", streamId, lastStreamKnownByPeer); } This check rejects only
private ChannelFuture writeHeaders0(final ChannelHandlerContext ctx, final int streamId, final Http2Headers headers, final boolean hasPriority, final int streamDependency, final short weight, final boolean exclusive, final int padding, final boolean endOfStream, ChannelPromise promise) { try { Http2Stream stream = connection.stream(streamId); if (stream == null) { try { stream = connection.local().createStream(streamId, /*endOfStream*/ false); An application opening a stream by writing HEADERS reaches the same
public ChannelFuture writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) { try { if (connection.goAwayReceived()) { throw connectionError(PROTOCOL_ERROR, "Sending PUSH_PROMISE after GO_AWAY received."); Netty explicitly prohibits Implementation BehaviorAfter receiving GOAWAY, Netty stores Inconsistency ReasonRFC 9113 prohibits a GOAWAY recipient from opening any additional streams on the connection. Netty instead prohibits only streams with IDs greater than Runtime EvidenceThe standalone probe opened local stream 1, recorded receipt of GOAWAY, and attempted to create local stream 3. With Probe: Execution method: The standalone Java probe was compiled against the checked Netty build and its local dependencies, then executed. The setup, inputs, and observed results are described in this section. Output: After receiving ImpactA client or server can initiate further HEADERS streams on the same connection after receiving GOAWAY when their IDs do not exceed Fix DirectionReject all new local stream creation when ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |