Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ await connection.ReceiveEnd(
}

[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57944")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think quarantining is even necessary this time? I'm confident in the fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Half the work in the process is creating an issue. You've already done that. May as well follow the rest of the process.

public async Task Http1Connection_RequestEndsWithIncompleteReadAsync()
{
var testMeterFactory = new TestMeterFactory();
Expand All @@ -171,7 +172,12 @@ public async Task Http1Connection_RequestEndsWithIncompleteReadAsync()
await using var server = new TestServer(async context =>
{
var result = await context.Request.BodyReader.ReadAsync();
await context.Response.BodyWriter.WriteAsync(result.Buffer.ToArray());

// The request body might be incomplete, but there should be something in the first read.
Assert.True(result.Buffer.Length > 0);
Assert.Equal(result.Buffer.ToSpan(), "Hello World?"u8[..(int)result.Buffer.Length]);

await context.Response.WriteAsync("Hello World?");
// No BodyReader.Advance. Connection will fail when attempting to complete body.
}, serviceContext);

Expand Down
Loading