Skip to content

[automated] Merge branch 'release/3.1' => 'master' #16743

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

Merged
Merged
3 changes: 2 additions & 1 deletion src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ await connection.Send(
}
}

[Fact]
[ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2181", FlakyOn.All)]
public async Task ConnectionNotClosedWhenClientSatisfiesMinimumDataRateGivenLargeResponseChunks()
{
var chunkSize = 64 * 128 * 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ await WithConnectionAsync(
Assert.Same(httpOptions.Credentials, httpClientHandler.Credentials);
}

[Fact]
public void HttpOptionsCannotSetNullCookieContainer()
{
var httpOptions = new HttpConnectionOptions();
Assert.NotNull(httpOptions.Cookies);
Assert.Throws<ArgumentNullException>(() => httpOptions.Cookies = null);
}

[Fact]
public async Task HttpRequestAndErrorResponseLogged()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,14 @@ private HttpClient CreateHttpClient()
{
httpClientHandler.Proxy = _httpConnectionOptions.Proxy;
}
if (_httpConnectionOptions.Cookies != null)

// Only access HttpClientHandler.ClientCertificates and HttpClientHandler.CookieContainer
// if the user has configured those options
// Some variants of Mono do not support client certs or cookies and will throw NotImplementedException
if (_httpConnectionOptions.Cookies.Count > 0)
{
httpClientHandler.CookieContainer = _httpConnectionOptions.Cookies;
}

// Only access HttpClientHandler.ClientCertificates if the user has configured client certs
// Mono does not support client certs and will throw NotImplementedException
// https://github.com/aspnet/SignalR/issues/2232
var clientCertificates = _httpConnectionOptions.ClientCertificates;
if (clientCertificates?.Count > 0)
Expand Down