File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Servers/Kestrel/test/FunctionalTests
Http.Connections.Client/src Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,8 @@ await connection.Send(
733
733
}
734
734
}
735
735
736
- [ Fact ]
736
+ [ ConditionalFact ]
737
+ [ Flaky ( "https://github.com/aspnet/AspNetCore-Internal/issues/2181" , FlakyOn . All ) ]
737
738
public async Task ConnectionNotClosedWhenClientSatisfiesMinimumDataRateGivenLargeResponseChunks ( )
738
739
{
739
740
var chunkSize = 64 * 128 * 1024 ;
Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ await WithConnectionAsync(
89
89
Assert . Same ( httpOptions . Credentials , httpClientHandler . Credentials ) ;
90
90
}
91
91
92
+ [ Fact ]
93
+ public void HttpOptionsCannotSetNullCookieContainer ( )
94
+ {
95
+ var httpOptions = new HttpConnectionOptions ( ) ;
96
+ Assert . NotNull ( httpOptions . Cookies ) ;
97
+ Assert . Throws < ArgumentNullException > ( ( ) => httpOptions . Cookies = null ) ;
98
+ }
99
+
92
100
[ Fact ]
93
101
public async Task HttpRequestAndErrorResponseLogged ( )
94
102
{
Original file line number Diff line number Diff line change @@ -517,13 +517,14 @@ private HttpClient CreateHttpClient()
517
517
{
518
518
httpClientHandler . Proxy = _httpConnectionOptions . Proxy ;
519
519
}
520
- if ( _httpConnectionOptions . Cookies != null )
520
+
521
+ // Only access HttpClientHandler.ClientCertificates and HttpClientHandler.CookieContainer
522
+ // if the user has configured those options
523
+ // Some variants of Mono do not support client certs or cookies and will throw NotImplementedException
524
+ if ( _httpConnectionOptions . Cookies . Count > 0 )
521
525
{
522
526
httpClientHandler . CookieContainer = _httpConnectionOptions . Cookies ;
523
527
}
524
-
525
- // Only access HttpClientHandler.ClientCertificates if the user has configured client certs
526
- // Mono does not support client certs and will throw NotImplementedException
527
528
// https://github.com/aspnet/SignalR/issues/2232
528
529
var clientCertificates = _httpConnectionOptions . ClientCertificates ;
529
530
if ( clientCertificates ? . Count > 0 )
You can’t perform that action at this time.
0 commit comments