File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
test/InMemory.FunctionalTests/Http2 Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1156,8 +1156,12 @@ private Task ProcessWindowUpdateFrameAsync()
1156
1156
{
1157
1157
if ( stream . RstStreamReceived )
1158
1158
{
1159
- // Hard abort, do not allow any more frames on this stream.
1160
- throw CreateReceivedFrameStreamAbortedException ( stream ) ;
1159
+ // WINDOW_UPDATE received after we have already processed an inbound RST_STREAM for this stream.
1160
+ // RFC 7540 (Sections 5.1, 6.9) / RFC 9113 do not explicitly define semantics for WINDOW_UPDATE on a
1161
+ // stream in the "closed" state due to a reset by client. We surface it as a stream error (STREAM_CLOSED)
1162
+ // rather than aborting the entire connection to keep behavior deterministic and consistent with other servers.
1163
+ // https://github.com/dotnet/aspnetcore/issues/63726
1164
+ throw new Http2StreamErrorException ( _incomingFrame . StreamId , CoreStrings . Http2StreamAborted , Http2ErrorCode . STREAM_CLOSED ) ;
1161
1165
}
1162
1166
1163
1167
if ( ! stream . TryUpdateOutputWindow ( _incomingFrame . WindowUpdateSizeIncrement ) )
Original file line number Diff line number Diff line change @@ -3584,7 +3584,6 @@ public async Task RST_STREAM_IncompleteRequest_AdditionalResetFrame_IgnoreAdditi
3584
3584
AssertConnectionNoError ( ) ;
3585
3585
}
3586
3586
3587
- [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/53744" ) ]
3588
3587
[ Fact ]
3589
3588
public async Task RST_STREAM_IncompleteRequest_AdditionalWindowUpdateFrame_ConnectionAborted ( )
3590
3589
{
@@ -3602,10 +3601,13 @@ public async Task RST_STREAM_IncompleteRequest_AdditionalWindowUpdateFrame_Conne
3602
3601
await SendDataAsync ( 1 , new byte [ 1 ] , endStream : false ) ;
3603
3602
await SendRstStreamAsync ( 1 ) ;
3604
3603
await SendWindowUpdateAsync ( 1 , 1024 ) ;
3605
- tcs . TrySetResult ( ) ;
3606
3604
3607
- await WaitForConnectionErrorAsync < Http2ConnectionErrorException > ( ignoreNonGoAwayFrames : false , expectedLastStreamId : 1 ,
3608
- Http2ErrorCode . STREAM_CLOSED , CoreStrings . FormatHttp2ErrorStreamAborted ( Http2FrameType . WINDOW_UPDATE , 1 ) ) ;
3605
+ await WaitForStreamErrorAsync ( expectedStreamId : 1 , Http2ErrorCode . STREAM_CLOSED , CoreStrings . Http2StreamAborted ) ;
3606
+
3607
+ tcs . TrySetResult ( ) ; // Don't let the response start until after the abort
3608
+
3609
+ await StopConnectionAsync ( expectedLastStreamId : 1 , ignoreNonGoAwayFrames : false ) ;
3610
+ AssertConnectionNoError ( ) ;
3609
3611
}
3610
3612
3611
3613
[ Fact ]
You can’t perform that action at this time.
0 commit comments