Merge branch 'release/3.1' => 'master' (#16743)

This commit is contained in:
Doug Bunting 2019-11-04 11:57:12 -08:00 committed by GitHub
commit 8a134f81d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View File

@ -733,7 +733,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
}
}
[Fact]
[ConditionalFact]
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2181", FlakyOn.All)]
public async Task ConnectionNotClosedWhenClientSatisfiesMinimumDataRateGivenLargeResponseChunks()
{
var chunkSize = 64 * 128 * 1024;

View File

@ -89,6 +89,14 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests
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()
{

View File

@ -517,13 +517,14 @@ namespace Microsoft.AspNetCore.Http.Connections.Client
{
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)