@@ -270,7 +270,7 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri =>
270
270
public static IEnumerable < object [ ] > SecureAndNonSecure_IPBasedUri_MemberData ( ) =>
271
271
from address in new [ ] { IPAddress . Loopback , IPAddress . IPv6Loopback }
272
272
from useSsl in BoolValues
273
- // we could not create SslStream in browser, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)]
273
+ // we could not create SslStream in browser, [ActiveIssue("https://github.com/dotnet/runtime/issues/37669", TestPlatforms.Browser)]
274
274
where PlatformDetection . IsNotBrowser || ! useSsl
275
275
select new object [ ] { address , useSsl } ;
276
276
@@ -880,8 +880,8 @@ await LoopbackServer.CreateClientAndServerAsync(async url =>
880
880
"\r \n " +
881
881
"5\r \n " +
882
882
"hello" + // missing \r\n terminator
883
- //"5\r\n" +
884
- //"world" + // missing \r\n terminator
883
+ //"5\r\n" +
884
+ //"world" + // missing \r\n terminator
885
885
"0\r \n " +
886
886
"\r \n " ) ) ;
887
887
}
@@ -985,7 +985,7 @@ await connection.WriteStringAsync(
985
985
} ) ;
986
986
}
987
987
988
- [ Theory ]
988
+ [ ConditionalTheory ]
989
989
[ InlineData ( true , true , true ) ]
990
990
[ InlineData ( true , true , false ) ]
991
991
[ InlineData ( true , false , false ) ]
@@ -995,6 +995,11 @@ await connection.WriteStringAsync(
995
995
[ ActiveIssue ( "https://github.com/dotnet/runtime/issues/65429" , typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNodeJS ) ) ]
996
996
public async Task ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream ( bool ? chunked , bool enableWasmStreaming , bool slowChunks )
997
997
{
998
+ if ( UseVersion == HttpVersion30 )
999
+ {
1000
+ throw new SkipTestException ( "https://github.com/dotnet/runtime/issues/91757" ) ;
1001
+ }
1002
+
998
1003
if ( IsWinHttpHandler && UseVersion >= HttpVersion20 . Value )
999
1004
{
1000
1005
return ;
@@ -1094,7 +1099,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri =>
1094
1099
if ( PlatformDetection . IsBrowser )
1095
1100
{
1096
1101
#if ! NETFRAMEWORK
1097
- if ( slowChunks )
1102
+ if ( slowChunks )
1098
1103
{
1099
1104
Assert . Equal ( 1 , await responseStream . ReadAsync ( new Memory < byte > ( buffer2 ) ) ) ;
1100
1105
Assert . Equal ( ( byte ) 'h' , buffer2 [ 0 ] ) ;
@@ -1204,7 +1209,7 @@ await server.AcceptConnectionAsync(async connection =>
1204
1209
{
1205
1210
case true :
1206
1211
await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Transfer-Encoding" , "chunked" ) } , isFinal : false ) ;
1207
- if ( PlatformDetection . IsBrowser && slowChunks )
1212
+ if ( PlatformDetection . IsBrowser && slowChunks )
1208
1213
{
1209
1214
await connection . SendResponseBodyAsync ( "1\r \n h\r \n " , false ) ;
1210
1215
await tcs . Task ;
@@ -1219,12 +1224,12 @@ await server.AcceptConnectionAsync(async connection =>
1219
1224
break ;
1220
1225
1221
1226
case false :
1222
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "11" ) } , content : "hello world" ) ;
1227
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "11" ) } , content : "hello world" ) ;
1223
1228
break ;
1224
1229
1225
1230
case null :
1226
1231
// This inject Content-Length header with null value to hint Loopback code to not include one automatically.
1227
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , null ) } , isFinal : false ) ;
1232
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , null ) } , isFinal : false ) ;
1228
1233
await connection . SendResponseBodyAsync ( "hello world" ) ;
1229
1234
break ;
1230
1235
}
@@ -1459,10 +1464,10 @@ await LoopbackServerFactory.CreateServerAsync(async (server3, url3) =>
1459
1464
Task serverTask3 = server3 . AcceptConnectionAsync ( async connection3 =>
1460
1465
{
1461
1466
await connection3 . ReadRequestDataAsync ( ) ;
1462
- await connection3 . SendResponseAsync ( HttpStatusCode . OK , new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "20" ) } , isFinal : false ) ;
1463
- await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : false ) ;
1467
+ await connection3 . SendResponseAsync ( HttpStatusCode . OK , new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , "20" ) } , isFinal : false ) ;
1468
+ await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : false ) ;
1464
1469
await unblockServers . Task ;
1465
- await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : true ) ;
1470
+ await connection3 . SendResponseBodyAsync ( "1234567890" , isFinal : true ) ;
1466
1471
} ) ;
1467
1472
1468
1473
// Make three requests
@@ -1536,7 +1541,7 @@ public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse()
1536
1541
}
1537
1542
}
1538
1543
1539
- #region Post Methods Tests
1544
+ #region Post Methods Tests
1540
1545
1541
1546
[ Fact ]
1542
1547
[ SkipOnPlatform ( TestPlatforms . Browser , "ExpectContinue not supported on Browser" ) ]
@@ -1580,13 +1585,13 @@ await server.AcceptConnectionAsync(async connection =>
1580
1585
1581
1586
public static IEnumerable < object [ ] > Interim1xxStatusCode ( )
1582
1587
{
1583
- yield return new object [ ] { ( HttpStatusCode ) 100 } ; // 100 Continue.
1588
+ yield return new object [ ] { ( HttpStatusCode ) 100 } ; // 100 Continue.
1584
1589
// 101 SwitchingProtocols will be treated as a final status code.
1585
- yield return new object [ ] { ( HttpStatusCode ) 102 } ; // 102 Processing.
1586
- yield return new object [ ] { ( HttpStatusCode ) 103 } ; // 103 EarlyHints.
1587
- yield return new object [ ] { ( HttpStatusCode ) 150 } ;
1588
- yield return new object [ ] { ( HttpStatusCode ) 180 } ;
1589
- yield return new object [ ] { ( HttpStatusCode ) 199 } ;
1590
+ yield return new object [ ] { ( HttpStatusCode ) 102 } ; // 102 Processing.
1591
+ yield return new object [ ] { ( HttpStatusCode ) 103 } ; // 103 EarlyHints.
1592
+ yield return new object [ ] { ( HttpStatusCode ) 150 } ;
1593
+ yield return new object [ ] { ( HttpStatusCode ) 180 } ;
1594
+ yield return new object [ ] { ( HttpStatusCode ) 199 } ;
1590
1595
}
1591
1596
1592
1597
[ Theory ]
@@ -1647,7 +1652,7 @@ await server.AcceptConnectionAsync(async connection =>
1647
1652
new HttpHeaderData ( "Content-type" , "text/xml" ) ,
1648
1653
new HttpHeaderData ( "Set-Cookie" , SetCookieIgnored1 ) } , isFinal : false ) ;
1649
1654
1650
- await connection . SendResponseAsync ( responseStatusCode , headers : new HttpHeaderData [ ] {
1655
+ await connection . SendResponseAsync ( responseStatusCode , headers : new HttpHeaderData [ ] {
1651
1656
new HttpHeaderData ( "Cookie" , "ignore_cookie=choco2" ) ,
1652
1657
new HttpHeaderData ( "Content-type" , "text/plain" ) ,
1653
1658
new HttpHeaderData ( "Set-Cookie" , SetCookieIgnored2 ) } , isFinal : false ) ;
@@ -1751,7 +1756,7 @@ await server.AcceptConnectionAsync(async connection =>
1751
1756
{
1752
1757
await connection . ReadRequestDataAsync ( readBody : false ) ;
1753
1758
// Send multiple 100-Continue responses.
1754
- for ( int count = 0 ; count < 4 ; count ++ )
1759
+ for ( int count = 0 ; count < 4 ; count ++ )
1755
1760
{
1756
1761
await connection . SendResponseAsync ( HttpStatusCode . Continue , isFinal : false ) ;
1757
1762
}
@@ -1855,7 +1860,7 @@ await server.AcceptConnectionAsync(async connection =>
1855
1860
{
1856
1861
await connection . ReadRequestDataAsync ( readBody : false ) ;
1857
1862
1858
- await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , $ "{ ResponseString . Length } ") } , isFinal : false ) ;
1863
+ await connection . SendResponseAsync ( HttpStatusCode . OK , headers : new HttpHeaderData [ ] { new HttpHeaderData ( "Content-Length" , $ "{ ResponseString . Length } ") } , isFinal : false ) ;
1859
1864
1860
1865
byte [ ] body = await connection . ReadRequestBodyAsync ( ) ;
1861
1866
Assert . Equal ( RequestString , Encoding . ASCII . GetString ( body ) ) ;
@@ -2136,7 +2141,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, rootUrl) =>
2136
2141
}
2137
2142
} ) ;
2138
2143
}
2139
- #endregion
2144
+ #endregion
2140
2145
2141
2146
[ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNotBrowserDomSupported ) ) ]
2142
2147
public async Task GetAsync_InvalidUrl_ExpectedExceptionThrown ( )
0 commit comments