@@ -269,7 +269,7 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
269
269
public static IEnumerable < object [ ] > SecureAndNonSecure_IPBasedUri_MemberData ( ) =>
270
270
from address in new [ ] { IPAddress . Loopback , IPAddress . IPv6Loopback }
271
271
from useSsl in BoolValues
272
- // we could not create SslStream in browser, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)]
272
+ // we could not create SslStream in browser, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)]
273
273
where PlatformDetection . IsNotBrowser || ! useSsl
274
274
select new object [ ] { address , useSsl } ;
275
275
@@ -882,8 +882,8 @@ await LoopbackServer.CreateClientAndServerAsync(async url =>
882
882
"\r \n " +
883
883
"5\r \n " +
884
884
"hello" + // missing \r\n terminator
885
- //"5\r\n" +
886
- //"world" + // missing \r\n terminator
885
+ //"5\r\n" +
886
+ //"world" + // missing \r\n terminator
887
887
"0\r \n " +
888
888
"\r \n " ) ) ;
889
889
}
@@ -988,7 +988,7 @@ await connection.WriteStringAsync(
988
988
} ) ;
989
989
}
990
990
991
- [ ConditionalTheory ]
991
+ [ Theory ]
992
992
[ InlineData ( true , true , true ) ]
993
993
[ InlineData ( true , true , false ) ]
994
994
[ InlineData ( true , false , false ) ]
@@ -998,11 +998,6 @@ await connection.WriteStringAsync(
998
998
[ ActiveIssue ( "https://github.com/dotnet/runtime/issues/65429" , typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNodeJS ) ) ]
999
999
public async Task ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream ( bool ? chunked , bool enableWasmStreaming , bool slowChunks )
1000
1000
{
1001
- if ( UseVersion == HttpVersion30 )
1002
- {
1003
- throw new SkipTestException ( "https://github.com/dotnet/runtime/issues/91757" ) ;
1004
- }
1005
-
1006
1001
if ( IsWinHttpHandler && UseVersion >= HttpVersion20 . Value )
1007
1002
{
1008
1003
return ;
@@ -1102,7 +1097,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
1102
1097
if ( PlatformDetection . IsBrowser )
1103
1098
{
1104
1099
#if ! NETFRAMEWORK
1105
- if ( slowChunks )
1100
+ if ( slowChunks )
1106
1101
{
1107
1102
Assert . Equal ( 1 , await responseStream . ReadAsync ( new Memory < byte > ( buffer2 ) ) ) ;
1108
1103
Assert . Equal ( ( byte ) 'h' , buffer2 [ 0 ] ) ;
@@ -1212,7 +1207,7 @@ await server.AcceptConnectionAsync(async connection =>
1212
1207
{
1213
1208
case true :
1214
1209
await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Transfer-Encoding" , "chunked" ) } , isFinal : false ) ;
1215
- if ( PlatformDetection . IsBrowser && slowChunks )
1210
+ if ( PlatformDetection . IsBrowser && slowChunks )
1216
1211
{
1217
1212
await connection . SendResponseBodyAsync ( "1\r \n h\r \n " , false ) ;
1218
1213
await tcs . Task ;
@@ -1227,12 +1222,12 @@ await server.AcceptConnectionAsync(async connection =>
1227
1222
break ;
1228
1223
1229
1224
case false :
1230
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "11" ) } , content : "hello world" ) ;
1225
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "11" ) } , content : "hello world" ) ;
1231
1226
break ;
1232
1227
1233
1228
case null :
1234
1229
// This inject Content-Length header with null value to hint Loopback code to not include one automatically.
1235
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , null ) } , isFinal : false ) ;
1230
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , null ) } , isFinal : false ) ;
1236
1231
await connection . SendResponseBodyAsync ( "hello world" ) ;
1237
1232
break ;
1238
1233
}
@@ -1468,10 +1463,10 @@ await LoopbackServerFactory.CreateServerAsync(async (server3, url3) =>
1468
1463
Task serverTask3 = server3 . AcceptConnectionAsync ( async connection3 =>
1469
1464
{
1470
1465
await connection3 . ReadRequestDataAsync ( ) ;
1471
- await connection3 . SendResponseAsync ( HttpStatusCode . OK , new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "20" ) } , isFinal : false ) ;
1472
- await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : false ) ;
1466
+ await connection3 . SendResponseAsync ( HttpStatusCode . OK , new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "20" ) } , isFinal : false ) ;
1467
+ await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : false ) ;
1473
1468
await unblockServers . Task ;
1474
- await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : true ) ;
1469
+ await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : true ) ;
1475
1470
} ) ;
1476
1471
1477
1472
// Make three requests
@@ -1545,7 +1540,7 @@ public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse()
1545
1540
}
1546
1541
}
1547
1542
1548
- #region Post Methods Tests
1543
+ #region Post Methods Tests
1549
1544
1550
1545
[ Fact ]
1551
1546
[ SkipOnPlatform ( TestPlatforms . Browser , "ExpectContinue not supported on Browser" ) ]
@@ -1589,13 +1584,13 @@ await server.AcceptConnectionAsync(async connection =>
1589
1584
1590
1585
public static IEnumerable < object [ ] > Interim1xxStatusCode ( )
1591
1586
{
1592
- yield return new object [ ] { ( HttpStatusCode ) 100 } ; // 100 Continue.
1587
+ yield return new object [ ] { ( HttpStatusCode ) 100 } ; // 100 Continue.
1593
1588
// 101 SwitchingProtocols will be treated as a final status code.
1594
- yield return new object [ ] { ( HttpStatusCode ) 102 } ; // 102 Processing.
1595
- yield return new object [ ] { ( HttpStatusCode ) 103 } ; // 103 EarlyHints.
1596
- yield return new object [ ] { ( HttpStatusCode ) 150 } ;
1597
- yield return new object [ ] { ( HttpStatusCode ) 180 } ;
1598
- yield return new object [ ] { ( HttpStatusCode ) 199 } ;
1589
+ yield return new object [ ] { ( HttpStatusCode ) 102 } ; // 102 Processing.
1590
+ yield return new object [ ] { ( HttpStatusCode ) 103 } ; // 103 EarlyHints.
1591
+ yield return new object [ ] { ( HttpStatusCode ) 150 } ;
1592
+ yield return new object [ ] { ( HttpStatusCode ) 180 } ;
1593
+ yield return new object [ ] { ( HttpStatusCode ) 199 } ;
1599
1594
}
1600
1595
1601
1596
[ Theory ]
@@ -1656,7 +1651,7 @@ await server.AcceptConnectionAsync(async connection =>
1656
1651
new HttpHeaderData ( "Content-type" , "text/xml" ) ,
1657
1652
new HttpHeaderData ( "Set-Cookie" , SetCookieIgnored1 ) } , isFinal : false ) ;
1658
1653
1659
- await connection . SendResponseAsync ( responseStatusCode , headers : new HttpHeaderData [ ] {
1654
+ await connection . SendResponseAsync ( responseStatusCode , headers : new HttpHeaderData [ ] {
1660
1655
new HttpHeaderData ( "Cookie" , "ignore_cookie=choco2" ) ,
1661
1656
new HttpHeaderData ( "Content-type" , "text/plain" ) ,
1662
1657
new HttpHeaderData ( "Set-Cookie" , SetCookieIgnored2 ) } , isFinal : false ) ;
@@ -1760,7 +1755,7 @@ await server.AcceptConnectionAsync(async connection =>
1760
1755
{
1761
1756
await connection . ReadRequestDataAsync ( readBody : false ) ;
1762
1757
// Send multiple 100-Continue responses.
1763
- for ( int count = 0 ; count < 4 ; count ++ )
1758
+ for ( int count = 0 ; count < 4 ; count ++ )
1764
1759
{
1765
1760
await connection . SendResponseAsync ( HttpStatusCode . Continue , isFinal : false ) ;
1766
1761
}
@@ -1864,7 +1859,7 @@ await server.AcceptConnectionAsync(async connection =>
1864
1859
{
1865
1860
await connection . ReadRequestDataAsync ( readBody : false ) ;
1866
1861
1867
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , $ "{ ResponseString . Length } ") } , isFinal : false ) ;
1862
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , $ "{ ResponseString . Length } ") } , isFinal : false ) ;
1868
1863
1869
1864
byte [ ] body = await connection . ReadRequestBodyAsync ( ) ;
1870
1865
Assert . Equal ( RequestString , Encoding . ASCII . GetString ( body ) ) ;
@@ -2129,7 +2124,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, rootUrl) =>
2129
2124
}
2130
2125
} ) ;
2131
2126
}
2132
- #endregion
2127
+ #endregion
2133
2128
2134
2129
[ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNotBrowserDomSupported ) ) ]
2135
2130
public async Task GetAsync_InvalidUrl_ExpectedExceptionThrown ( )
0 commit comments