[SkipOnPlatform(TestPlatforms.Browser, "CookieContainer is not supported on Browser")]
public async Task GetAsyncWithRedirect_SetCookieContainer_CorrectCookiesSent()
{
+ if (UseVersion == HttpVersion30)
+ {
+ // [ActiveIssue("https://github.com/dotnet/runtime/issues/56870")]
+ return;
+ }
+
const string path1 = "/foo";
const string path2 = "/bar";
const string unusedPath = "/unused";
[SkipOnPlatform(TestPlatforms.Browser, "CookieContainer is not supported on Browser")]
public async Task GetAsync_Redirect_CookiesArePreserved()
{
+ if (UseVersion == HttpVersion30)
+ {
+ // [ActiveIssue("https://github.com/dotnet/runtime/issues/56870")]
+ return;
+ }
+
HttpClientHandler handler = CreateHttpClientHandler();
string loginPath = "/login/user";
[SkipOnPlatform(TestPlatforms.Browser, "CookieContainer is not supported on Browser")]
public async Task GetAsyncWithRedirect_ReceiveSetCookie_CookieSent()
{
+ if (UseVersion == HttpVersion30)
+ {
+ // [ActiveIssue("https://github.com/dotnet/runtime/issues/56870")]
+ return;
+ }
+
const string path1 = "/foo";
const string path2 = "/bar";
[SkipOnPlatform(TestPlatforms.Browser, "CookieContainer is not supported on Browser")]
public async Task GetAsyncWithBasicAuth_ReceiveSetCookie_CookieSent()
{
+ if (UseVersion == HttpVersion30)
+ {
+ // [ActiveIssue("https://github.com/dotnet/runtime/issues/56870")]
+ return;
+ }
+
if (IsWinHttpHandler)
{
// Issue https://github.com/dotnet/runtime/issues/24979
// The server is requesting us fall back to an older HTTP version.
throw new HttpRequestException(SR.net_http_retry_on_older_version, ex, RequestRetryType.RetryOnLowerHttpVersion);
}
+ catch (QuicStreamAbortedException ex) when (ex.ErrorCode == (long)Http3ErrorCode.RequestRejected)
+ {
+ // The server is rejecting the request without processing it, retry it on a different connection.
+ throw new HttpRequestException(SR.net_http_request_aborted, ex, RequestRetryType.RetryOnConnectionFailure);
+ }
catch (QuicStreamAbortedException ex)
{
// Our stream was reset.
Exception abortException = _connection.Abort(ex);
throw new HttpRequestException(SR.net_http_client_execution_error, abortException);
}
- catch (OperationCanceledException ex)
- when (ex.CancellationToken == requestCancellationSource.Token) // It is possible for user's Content code to throw an unexpected OperationCanceledException.
+ // It is possible for user's Content code to throw an unexpected OperationCanceledException.
+ catch (OperationCanceledException ex) when (ex.CancellationToken == requestCancellationSource.Token)
{
// We're either observing GOAWAY, or the cancellationToken parameter has been canceled.
-
if (cancellationToken.IsCancellationRequested)
{
_stream.AbortWrite((long)Http3ErrorCode.RequestCancelled);
protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.Mock;
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/53093")]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMsQuicSupported))]
[Collection("NoParallelTests")]
public sealed class SocketsHttpHandlerTest_Cookies_Http3_MsQuic : HttpClientHandlerTest_Cookies
protected override QuicImplementationProvider UseQuicImplementationProvider => QuicImplementationProviders.MsQuic;
}
- [ActiveIssue("https://github.com/dotnet/runtime/issues/53093")]
[ConditionalClass(typeof(HttpClientHandlerTestBase), nameof(IsMockQuicSupported))]
[Collection("NoParallelTests")]
public sealed class SocketsHttpHandlerTest_Cookies_Http3_Mock : HttpClientHandlerTest_Cookies
{
return;
}
-
+
const long expectedErrorCode = 1234;
await RunClientServer(
{
await using QuicStream stream = await connection.AcceptStreamAsync();
- async Task ReadUntilAborted()
+ async Task ReadUntilAborted()
{
var buffer = new byte[1024];
while (true)