Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SocketsHttpHandlerTest_HttpClientHandlerTest_Http3.ReadAsStreamAsync_Cancellation data race #101428

Merged
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 @@ -6,6 +6,9 @@
using System.Linq;
using System.Net.Http.Headers;
using System.Net.Sockets;
#if !NETFRAMEWORK
using System.Net.Quic;
#endif
using System.Net.Test.Common;
using System.Security.Authentication;
using System.Security.Cryptography;
Expand Down Expand Up @@ -1396,6 +1399,12 @@ await server.AcceptConnectionAsync(async connection =>
await connection.SendResponseAsync(HttpStatusCode.OK, headers: new HttpHeaderData[] { new HttpHeaderData("Transfer-Encoding", "chunked") }, isFinal: false);
await connection.SendResponseBodyAsync("1\r\nh\r\n", false);
}
#if !NETFRAMEWORK
catch (QuicException ex) when (ex.ApplicationErrorCode == 0x10c /*H3_REQUEST_CANCELLED*/)
{
// The request was cancelled before we sent the body, ignore
}
#endif
catch (IOException ex)
{
// when testing in the browser, we are using the WebSocket for the loopback
Expand Down
Loading