-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
Dependency update from dotnet/aspnetcore#50362 caused new behavior in some tests.
Some tests hang on reading to the end of the response:
POST_ServerCompletesWithoutReadingRequestBody_ClientGetsResponsehangs here
Some tests hang on disposing the response:
POST_ClientCancellationBidirectional_RequestAbortRaised(protocol: Http3)hangs here
Consistent between the tests is we have streaming request content via StreamingHttpContent. In the tests we're not completing the request stream so SerializeToStreamAsync doesn't exit.
Note: The implementation of SerializeToStreamAsync is listening to the cancellation token. I don't know if it was canceled before and isn't now, or if it should be canceled at all, but it isn't when I debug the tests.
It seems like wrong behavior for the request stream not being completed to cause a hang when reading to the end of response data (the server in POST_ServerCompletesWithoutReadingRequestBody_ClientGetsResponse has sent its data and completed), or aborting the response via dispose.
Reproduction Steps
See tests above.
Expected behavior
Either:
- The cancellation token to
SerializeToStreamAsyncis canceled when the response finishes or theHttpResponseMessage.Dispose()is called, or SerializeToStreamAsyncnot exiting doesn't hang finishing reading the response or aborting
Actual behavior
Hangs
Regression?
Worked in .NET 8
Known Workarounds
No response
Configuration
.NET 9 latest from dotnet/aspnetcore#50362
Other information
No response