@@ -633,7 +633,7 @@ private void EndpointConfigSectionCanSetProtocols(string input, HttpProtocols ex
633
633
serverOptions . ConfigureEndpointDefaults ( opt =>
634
634
{
635
635
// Kestrel default.
636
- Assert . Equal ( HttpProtocols . Http1AndHttp2 , opt . Protocols ) ;
636
+ Assert . Equal ( ListenOptions . DefaultHttpProtocols , opt . Protocols ) ;
637
637
ranDefault = true ;
638
638
} ) ;
639
639
@@ -663,14 +663,14 @@ private void EndpointConfigSectionCanSetProtocols(string input, HttpProtocols ex
663
663
. LocalhostEndpoint ( 5002 , opt =>
664
664
{
665
665
// Kestrel default.
666
- Assert . Equal ( HttpProtocols . Http1AndHttp2 , opt . Protocols ) ;
666
+ Assert . Equal ( ListenOptions . DefaultHttpProtocols , opt . Protocols ) ;
667
667
ran2 = true ;
668
668
} )
669
669
. Load ( ) ;
670
670
serverOptions . ListenAnyIP ( 0 , opt =>
671
671
{
672
672
// Kestrel default.
673
- Assert . Equal ( HttpProtocols . Http1AndHttp2 , opt . Protocols ) ;
673
+ Assert . Equal ( ListenOptions . DefaultHttpProtocols , opt . Protocols ) ;
674
674
ran3 = true ;
675
675
} ) ;
676
676
@@ -1038,13 +1038,15 @@ public void Reload_IdentifiesEndpointsWithChangedDefaults()
1038
1038
1039
1039
var ( endpointsToStop , endpointsToStart ) = serverOptions . ConfigurationLoader . Reload ( ) ;
1040
1040
1041
- Assert . Single ( endpointsToStop ) ;
1042
- Assert . Single ( endpointsToStart ) ;
1041
+ // NonDefaultProtocol is unchanged and doesn't need to be stopped/started
1042
+ var stopEndpoint = Assert . Single ( endpointsToStop ) ;
1043
+ var startEndpoint = Assert . Single ( endpointsToStart ) ;
1044
+
1045
+ Assert . Equal ( 5000 , stopEndpoint . IPEndPoint . Port ) ;
1046
+ Assert . Equal ( ListenOptions . DefaultHttpProtocols , stopEndpoint . Protocols ) ;
1043
1047
1044
- Assert . Equal ( 5000 , endpointsToStop [ 0 ] . IPEndPoint . Port ) ;
1045
- Assert . Equal ( HttpProtocols . Http1AndHttp2 , endpointsToStop [ 0 ] . Protocols ) ;
1046
- Assert . Equal ( 5000 , endpointsToStart [ 0 ] . IPEndPoint . Port ) ;
1047
- Assert . Equal ( HttpProtocols . Http1 , endpointsToStart [ 0 ] . Protocols ) ;
1048
+ Assert . Equal ( 5000 , startEndpoint . IPEndPoint . Port ) ;
1049
+ Assert . Equal ( HttpProtocols . Http1 , startEndpoint . Protocols ) ;
1048
1050
}
1049
1051
1050
1052
[ Fact ]
0 commit comments