parent
1f2e704dd3
commit
3a1cf72451
|
|
@ -1218,7 +1218,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
await StartStreamAsync(1, headers, endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: true);
|
||||
|
||||
var headersFrame = await ExpectAsync(Http2FrameType.HEADERS,
|
||||
withLength: 59,
|
||||
|
|
@ -1229,6 +1228,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
withFlags: (byte)Http2DataFrameFlags.END_STREAM,
|
||||
withStreamId: 1);
|
||||
|
||||
await WaitForStreamErrorAsync(1, Http2ErrorCode.NO_ERROR, null);
|
||||
// Logged without an exception.
|
||||
Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("the application completed without reading the entire request body."));
|
||||
|
||||
await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false);
|
||||
|
||||
_hpackDecoder.Decode(headersFrame.PayloadSequence, endHeaders: false, handler: this);
|
||||
|
|
@ -1277,7 +1280,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
await StartStreamAsync(1, headers, endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: false);
|
||||
await SendDataAsync(1, new byte[6], endStream: true);
|
||||
await SendDataAsync(1, new byte[6], endStream: false);
|
||||
|
||||
var headersFrame = await ExpectAsync(Http2FrameType.HEADERS,
|
||||
withLength: 59,
|
||||
|
|
@ -1287,6 +1290,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
withLength: 0,
|
||||
withFlags: (byte)Http2DataFrameFlags.END_STREAM,
|
||||
withStreamId: 1);
|
||||
await WaitForStreamErrorAsync(1, Http2ErrorCode.NO_ERROR, null);
|
||||
// Logged without an exception.
|
||||
Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("the application completed without reading the entire request body."));
|
||||
|
||||
await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,9 +66,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
});
|
||||
|
||||
// Send continuation frame to verify intermediate request header timeout doesn't interfere with keep-alive timeout.
|
||||
await SendHeadersAsync(1, Http2HeadersFrameFlags.NONE, _browserRequestHeaders);
|
||||
await SendHeadersAsync(1, Http2HeadersFrameFlags.END_STREAM, _browserRequestHeaders);
|
||||
await SendEmptyContinuationFrameAsync(1, Http2ContinuationFrameFlags.END_HEADERS);
|
||||
await SendDataAsync(1, new Memory<byte>(), endStream: true);
|
||||
|
||||
_mockTimeoutControl.Verify(c => c.SetTimeout(It.IsAny<long>(), TimeoutReason.RequestHeaders), Times.Once);
|
||||
|
||||
|
|
@ -106,7 +105,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
|
|||
|
||||
await InitializeConnectionAsync(_noopApplication);
|
||||
|
||||
await SendHeadersAsync(1, Http2HeadersFrameFlags.NONE, _browserRequestHeaders);
|
||||
await SendHeadersAsync(1, Http2HeadersFrameFlags.END_STREAM, _browserRequestHeaders);
|
||||
|
||||
await SendEmptyContinuationFrameAsync(1, Http2ContinuationFrameFlags.NONE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue