@@ -58,12 +58,19 @@ public static partial class Http
5858 public static readonly Uri RemoteEchoServer = new Uri ( "http://" + Host + "/" + EchoHandler ) ;
5959 public static readonly Uri SecureRemoteEchoServer = new Uri ( "https://" + SecureHost + "/" + EchoHandler ) ;
6060 public static readonly Uri Http2RemoteEchoServer = new Uri ( "https://" + Http2Host + "/" + EchoHandler ) ;
61- public static readonly Uri [ ] EchoServerList = new Uri [ ] { RemoteEchoServer , SecureRemoteEchoServer , Http2RemoteEchoServer } ;
61+ public static Uri [ ] GetEchoServerList ( )
62+ {
63+ if ( PlatformDetection . IsFirefox )
64+ {
65+ // https://github.com/dotnet/runtime/issues/101115
66+ return [ RemoteEchoServer ] ;
67+ }
68+ return [ RemoteEchoServer , SecureRemoteEchoServer , Http2RemoteEchoServer ] ;
69+ }
6270
6371 public static readonly Uri RemoteVerifyUploadServer = new Uri ( "http://" + Host + "/" + VerifyUploadHandler ) ;
6472 public static readonly Uri SecureRemoteVerifyUploadServer = new Uri ( "https://" + SecureHost + "/" + VerifyUploadHandler ) ;
6573 public static readonly Uri Http2RemoteVerifyUploadServer = new Uri ( "https://" + Http2Host + "/" + VerifyUploadHandler ) ;
66- public static readonly Uri [ ] VerifyUploadServerList = new Uri [ ] { RemoteVerifyUploadServer , SecureRemoteVerifyUploadServer , Http2RemoteVerifyUploadServer } ;
6774
6875 public static readonly Uri RemoteEmptyContentServer = new Uri ( "http://" + Host + "/" + EmptyContentHandler ) ;
6976 public static readonly Uri RemoteDeflateServer = new Uri ( "http://" + Host + "/" + DeflateHandler ) ;
@@ -72,7 +79,7 @@ public static partial class Http
7279 public static readonly Uri Http2RemoteGZipServer = new Uri ( "https://" + Http2Host + "/" + GZipHandler ) ;
7380 public static Uri RemoteLoopServer => new Uri ( "ws://" + RemoteLoopHost + "/" + RemoteLoopHandler ) ;
7481
75- public static readonly object [ ] [ ] EchoServers = EchoServerList . Select ( x => new object [ ] { x } ) . ToArray ( ) ;
82+ public static readonly object [ ] [ ] EchoServers = GetEchoServerList ( ) . Select ( x => new object [ ] { x } ) . ToArray ( ) ;
7683 public static readonly object [ ] [ ] VerifyUploadServers = { new object [ ] { RemoteVerifyUploadServer } , new object [ ] { SecureRemoteVerifyUploadServer } , new object [ ] { Http2RemoteVerifyUploadServer } } ;
7784 public static readonly object [ ] [ ] CompressedServers = { new object [ ] { RemoteDeflateServer } , new object [ ] { RemoteGZipServer } , new object [ ] { Http2RemoteDeflateServer } , new object [ ] { Http2RemoteGZipServer } } ;
7885
@@ -83,9 +90,17 @@ public static partial class Http
8390 public static readonly RemoteServer RemoteSecureHttp11Server = new RemoteServer ( new Uri ( "https://" + SecureHost + "/" ) , HttpVersion . Version11 ) ;
8491 public static readonly RemoteServer RemoteHttp2Server = new RemoteServer ( new Uri ( "https://" + Http2Host + "/" ) , new Version ( 2 , 0 ) ) ;
8592
86- public static readonly IEnumerable < RemoteServer > RemoteServers = new RemoteServer [ ] { RemoteHttp11Server , RemoteSecureHttp11Server , RemoteHttp2Server } ;
93+ public static IEnumerable < RemoteServer > GetRemoteServers ( )
94+ {
95+ if ( PlatformDetection . IsFirefox )
96+ {
97+ // https://github.com/dotnet/runtime/issues/101115
98+ return new RemoteServer [ ] { RemoteHttp11Server } ;
99+ }
100+ return new RemoteServer [ ] { RemoteHttp11Server , RemoteSecureHttp11Server , RemoteHttp2Server } ;
101+ }
87102
88- public static readonly IEnumerable < object [ ] > RemoteServersMemberData = RemoteServers . Select ( s => new object [ ] { s } ) ;
103+ public static readonly IEnumerable < object [ ] > RemoteServersMemberData = GetRemoteServers ( ) . Select ( s => new object [ ] { s } ) ;
89104
90105 public sealed class RemoteServer
91106 {
0 commit comments