108 writes to Protocols
Aspire.Dashboard.Tests (1)
Integration\DashboardClientAuthTests.cs (1)
101options.Protocols = HttpProtocols.Http2;
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
164options.Protocols = HttpProtocols.Http2;
Http2SampleApp (3)
Program.cs (3)
34listenOptions.Protocols = HttpProtocols.Http1; 40listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 66listenOptions.Protocols = HttpProtocols.Http2;
Http3SampleApp (7)
Program.cs (7)
35listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 49listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 56listenOptions.Protocols = HttpProtocols.Http3; 67listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 78listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 93listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 111listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
InMemory.FunctionalTests (32)
EventSourceTests.cs (1)
159listenOptions.Protocols = HttpProtocols.Http2;
Http2\Http2EndToEndTests.cs (1)
43listenOptions.Protocols = HttpProtocols.Http2;
Http2\TlsTests.cs (1)
52listenOptions.Protocols = HttpProtocols.Http2;
HttpProtocolSelectionTests.cs (2)
64Protocols = serverProtocols 83Protocols = serverProtocols
HttpsConnectionMiddlewareTests.cs (9)
505listenOptions.Protocols = httpProtocols; 541listenOptions.Protocols = HttpProtocols.Http1; 585listenOptions.Protocols = httpProtocols; 626listenOptions.Protocols = HttpProtocols.Http1; 759listenOptions.Protocols = HttpProtocols.Http1; 883listenOptions.Protocols = HttpProtocols.Http1; 1020listenOptions.Protocols = HttpProtocols.Http1; 1067listenOptions.Protocols = HttpProtocols.Http1; 1390listenOptions.Protocols = httpProtocols;
HttpsTests.cs (6)
447listenOptions.Protocols = HttpProtocols.Http3; 491listenOptions.Protocols = HttpProtocols.Http3; 532listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 568listenOptions.Protocols = HttpProtocols.Http3; 603listenOptions.Protocols = HttpProtocols.Http3; 649listenOptions.Protocols = HttpProtocols.Http3;
KestrelMetricsTests.cs (5)
549listenOptions.Protocols = HttpProtocols.Http2; 627listenOptions.Protocols = HttpProtocols.Http2; 697listenOptions.Protocols = HttpProtocols.Http2; 782listenOptions.Protocols = HttpProtocols.Http2; 866listenOptions.Protocols = HttpProtocols.Http2;
ResponseTests.cs (7)
4379Protocols = HttpProtocols.Http1AndHttp2AndHttp3 4412Protocols = HttpProtocols.Http1AndHttp2AndHttp3, 4449Protocols = HttpProtocols.Http1AndHttp2AndHttp3, 4478new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0)) { Protocols = HttpProtocols.Http1 })) 4507Protocols = HttpProtocols.Http1 4511Protocols = HttpProtocols.Http3, 4547Protocols = HttpProtocols.Http1AndHttp2AndHttp3,
Interop.FunctionalTests (23)
H2SpecTests.cs (1)
38listenOptions.Protocols = HttpProtocols.Http2;
Http2\Http2RequestTests.cs (1)
108listenOptions.Protocols = HttpProtocols.Http2;
Http2WebSocketInteropTests.cs (1)
180listenOptions.Protocols = protocols;
Http3\Http3RequestTests.cs (7)
900listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 1221listenOptions.Protocols = protocol; 1589listenOptions.Protocols = HttpProtocols.Http3; 1640listenOptions.Protocols = HttpProtocols.Http3; 1693listenOptions.Protocols = HttpProtocols.Http3; 1862listenOptions.Protocols = HttpProtocols.Http3; 2025listenOptions.Protocols = protocol;
Http3\Http3TlsTests.cs (9)
37listenOptions.Protocols = HttpProtocols.Http3; 88listenOptions.Protocols = HttpProtocols.Http3; 130listenOptions.Protocols = HttpProtocols.Http3; 175listenOptions.Protocols = HttpProtocols.Http3; 229listenOptions.Protocols = HttpProtocols.Http3; 270listenOptions.Protocols = protocols; 300listenOptions.Protocols = HttpProtocols.Http3; 354listenOptions.Protocols = HttpProtocols.Http3; 456listenOptions.Protocols = HttpProtocols.Http3;
HttpClientHttp2InteropTests.cs (3)
1608listenOptions.Protocols = HttpProtocols.Http2; 1653listenOptions.Protocols = HttpProtocols.Http2; 1712listenOptions.Protocols = HttpProtocols.Http2;
HttpHelpers.cs (1)
78listenOptions.Protocols = protocol ?? HttpProtocols.Http3;
InteropWebsite (1)
Program.cs (1)
62listenOptions.Protocols = HttpProtocols.Http2;
Kestrel.SampleApp (1)
Startup.cs (1)
108listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1;
Microsoft.AspNetCore.Server.Kestrel.Core (2)
KestrelConfigurationLoader.cs (2)
243listenOptions.Protocols = defaults.Protocols.Value; 370listenOptions.Protocols = endpoint.Protocols.Value;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
KestrelServerOptionsTests.cs (3)
35opt.Protocols = HttpProtocols.Http1; 48opt.Protocols = HttpProtocols.Http2; // Can be overriden 54opt.Protocols = HttpProtocols.Http2;
KestrelServerTests.cs (7)
204opt.Protocols = protocols.Value; 381c.Protocols = HttpProtocols.Http3; 403c.Protocols = HttpProtocols.Http3; 429options.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 456options.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; 487options.Protocols = HttpProtocols.Http1AndHttp2; 515options.Protocols = HttpProtocols.Http3;
ListenOptionsTests.cs (1)
60localhostListenOptions.Protocols = HttpProtocols.Http1;
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
158opt.Protocols = HttpProtocols.Http1;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (8)
WebHostTests.cs (8)
56listenOptions.Protocols = Core.HttpProtocols.Http3; 111listenOptions.Protocols = Core.HttpProtocols.Http3; 116listenOptions.Protocols = Core.HttpProtocols.Http1; 151listenOptions.Protocols = Core.HttpProtocols.Http1AndHttp2AndHttp3; 188listenOptions.Protocols = Core.HttpProtocols.Http1AndHttp2AndHttp3; 226listenOptions.Protocols = Core.HttpProtocols.Http1AndHttp2AndHttp3; 297listenOptions.Protocols = Core.HttpProtocols.Http1AndHttp2AndHttp3; 392listenOptions.Protocols = Core.HttpProtocols.Http3;
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
HubConnectionTests.cs (8)
1750o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http2; 1808o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http1; 1868o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http1AndHttp2; 1911o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http2; 2368o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http1AndHttp2; 2421o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http2; 2464o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http1AndHttp2; 2514o2.Protocols = Server.Kestrel.Core.HttpProtocols.Http2;
Sockets.FunctionalTests (6)
src\Servers\Kestrel\test\FunctionalTests\Http2\HandshakeTests.cs (3)
56listenOptions.Protocols = HttpProtocols.Http2; 82listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 110listenOptions.Protocols = HttpProtocols.Http2;
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (3)
80listenOptions.Protocols = HttpProtocols.Http2; 137listenOptions.Protocols = HttpProtocols.Http2; 188listenOptions.Protocols = HttpProtocols.Http2;
WebTransportInteractiveSampleApp (2)
Program.cs (2)
28listenOptions.Protocols = HttpProtocols.Http1AndHttp2; 35listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
WebTransportSampleApp (1)
Program.cs (1)
19listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
37 references to Protocols
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Internal\KestrelServerImpl.cs (6)
137var hasHttp1 = options.Protocols.HasFlag(HttpProtocols.Http1); 138var hasHttp2 = options.Protocols.HasFlag(HttpProtocols.Http2); 139var hasHttp3 = options.Protocols.HasFlag(HttpProtocols.Http3); 185|| options.Protocols == HttpProtocols.None) // TODO a test fails because it doesn't throw an exception in the right place 193options.UseHttpServer(ServiceContext, application, options.Protocols, addAltSvcHeader); 212options.UseHttp3Server(ServiceContext, application, options.Protocols, addAltSvcHeader);
KestrelServerOptions.cs (2)
368writer.WriteString(nameof(listenOptions.Protocols), listenOptions.Protocols.ToString());
ListenOptions.cs (2)
110/// Tracks whether <see cref="Protocols"/> has been set explicitly so that we can determine whether 119/// The "Alt-Svc" header is automatically included with a response if <see cref="Protocols"/> has either
ListenOptionsHttpsExtensions.cs (2)
202var middleware = new HttpsConnectionMiddleware(next, httpsOptions, listenOptions.Protocols, loggerFactory, metrics); 267callbackOptions.HttpProtocols = listenOptions.Protocols;
TlsConfigurationLoader.cs (1)
113httpsOptions, listenOptions.Protocols, _httpsLogger);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
KestrelServerOptionsTests.cs (6)
31Assert.Equal(ListenOptions.DefaultHttpProtocols, options.CodeBackedListenOptions[0].Protocols); 41Assert.Equal(HttpProtocols.Http1, opt.Protocols); 43Assert.Equal(HttpProtocols.Http1, options.CodeBackedListenOptions[1].Protocols); 47Assert.Equal(HttpProtocols.Http1, opt.Protocols); 50Assert.Equal(HttpProtocols.Http2, options.CodeBackedListenOptions[2].Protocols); 56Assert.Equal(HttpProtocols.Http2, options.CodeBackedListenOptions[3].Protocols);
ListenOptionsTests.cs (5)
19Assert.Equal(ListenOptions.DefaultHttpProtocols, listenOptions.Protocols); 58Assert.Equal(localhostListenOptions.Protocols, clone1.Protocols); 65Assert.Equal(localhostListenOptions.Protocols, clone2.Protocols);
Microsoft.AspNetCore.Server.Kestrel.Tests (12)
KestrelConfigurationLoaderTests.cs (12)
183Assert.Equal(HttpProtocols.Http1, opt.ListenOptions.Protocols); 188Assert.Equal(HttpProtocols.Http1, opt.Protocols); 1051Assert.Equal(expected, opt.Protocols); 1075Assert.Equal(expected, opt.ListenOptions.Protocols); 1080Assert.Equal(expected, opt.Protocols); 1086Assert.Equal(expected, opt.Protocols); 1121Assert.Equal(ListenOptions.DefaultHttpProtocols, opt.Protocols); 1145Assert.Equal(expected, opt.ListenOptions.Protocols); 1151Assert.Equal(ListenOptions.DefaultHttpProtocols, opt.Protocols); 1158Assert.Equal(ListenOptions.DefaultHttpProtocols, opt.Protocols); 1531Assert.Equal(ListenOptions.DefaultHttpProtocols, stopEndpoint.Protocols); 1534Assert.Equal(HttpProtocols.Http1, startEndpoint.Protocols);
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
921Assert.Equal(expected, capturedOptions.OptionsInUse[0].Protocols);