126 references to HttpVersionPolicy
HttpClientApp (1)
Program.cs (1)
20client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher;
IIS.FunctionalTests (9)
Http3Tests.cs (9)
49client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 64client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 69request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 89client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 108client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 122client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 135client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 151client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 168client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact;
InMemory.FunctionalTests (7)
EventSourceTests.cs (1)
192VersionPolicy = HttpVersionPolicy.RequestVersionExact,
Http2\Http2EndToEndTests.cs (1)
69VersionPolicy = HttpVersionPolicy.RequestVersionExact,
KestrelMetricsTests.cs (5)
571VersionPolicy = HttpVersionPolicy.RequestVersionExact, 650VersionPolicy = HttpVersionPolicy.RequestVersionExact, 728VersionPolicy = HttpVersionPolicy.RequestVersionExact, 809VersionPolicy = HttpVersionPolicy.RequestVersionExact, 897VersionPolicy = HttpVersionPolicy.RequestVersionExact,
Interop.FunctionalTests (63)
Http2\Http2RequestTests.cs (4)
128request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 185request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 211request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 295request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
Http2WebSocketInteropTests.cs (11)
28new object[] { "http", "1.1", HttpVersionPolicy.RequestVersionExact, HttpProtocols.Http1, "HTTP/1.1" }, 29new object[] { "http", "2.0", HttpVersionPolicy.RequestVersionExact, HttpProtocols.Http2, "HTTP/2" }, 30new object[] { "http", "1.1", HttpVersionPolicy.RequestVersionOrHigher, HttpProtocols.Http1AndHttp2, "HTTP/1.1" }, // No TLS/APLN, Can't upgrade 31new object[] { "http", "2.0", HttpVersionPolicy.RequestVersionOrLower, HttpProtocols.Http1AndHttp2, "HTTP/1.1" }, // No TLS/APLN, Downgrade 36list.Add(new object[] { "https", "1.1", HttpVersionPolicy.RequestVersionExact, HttpProtocols.Http1, "HTTP/1.1" }); 37list.Add(new object[] { "https", "2.0", HttpVersionPolicy.RequestVersionExact, HttpProtocols.Http2, "HTTP/2" }); 38list.Add(new object[] { "https", "1.1", HttpVersionPolicy.RequestVersionOrHigher, HttpProtocols.Http1AndHttp2, "HTTP/2" }); // Upgrade 39list.Add(new object[] { "https", "2.0", HttpVersionPolicy.RequestVersionOrLower, HttpProtocols.Http1AndHttp2, "HTTP/2" }); 40list.Add(new object[] { "https", "2.0", HttpVersionPolicy.RequestVersionOrLower, HttpProtocols.Http1, "HTTP/1.1" }); // Downgrade 49public async Task HttpVersionNegotationWorks(string scheme, string clientVersion, HttpVersionPolicy clientPolicy, HttpProtocols serverProtocols, string expectedVersion) 145wsClient.Options.HttpVersionPolicy = HttpVersionPolicy.RequestVersionExact;
Http3\Http3RequestTests.cs (37)
91request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 150request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 252request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 296request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 377request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 420request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 491request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 562request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 621request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 677request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 727request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 817request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 853request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 864request2.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 913request1.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 926request2.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 942request3.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 1016request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1113request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1259request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1318request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1372request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1424request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1434request2.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1491request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1502request2.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1543request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1561request2.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1605request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1665request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1721request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1841request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1887request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 1964request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 2041request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 2141request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 2194request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
Http3\Http3TlsTests.cs (7)
58request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 105request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 147request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 196request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 246request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 324request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 475request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
HttpClientHttp2InteropTests.cs (4)
1632client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 1677client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 1692client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 1701VersionPolicy = HttpVersionPolicy.RequestVersionExact,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (9)
Http3Tests.cs (9)
43client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 72client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 77request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 113client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 147client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 175client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 205client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 230client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact; 254client.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
WebHostTests.cs (6)
81request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 247request1.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 261request2.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 318request1.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 331request2.VersionPolicy = HttpVersionPolicy.RequestVersionOrHigher; 354request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
HubConnectionTests.cs (3)
1771o.HttpVersionPolicy = HttpVersionPolicy.RequestVersionExact; 1890o.HttpVersionPolicy = HttpVersionPolicy.RequestVersionExact; 1932o.HttpVersionPolicy = HttpVersionPolicy.RequestVersionExact;
System.Net.Http (19)
System\Net\Http\HttpClient.cs (2)
30private HttpVersionPolicy _defaultVersionPolicy = HttpRequestMessage.DefaultVersionPolicy; 71public HttpVersionPolicy DefaultVersionPolicy
System\Net\Http\HttpRequestMessage.cs (4)
16internal static HttpVersionPolicy DefaultVersionPolicy => HttpVersionPolicy.RequestVersionOrLower; 31private HttpVersionPolicy _versionPolicy; 50public HttpVersionPolicy VersionPolicy
System\Net\Http\HttpTelemetry.cs (3)
38private void RequestStart(string scheme, string host, int port, string pathAndQuery, byte versionMajor, byte versionMinor, HttpVersionPolicy versionPolicy) 254private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, int arg3, string? arg4, byte arg5, byte arg6, HttpVersionPolicy arg7) 300Size = sizeof(HttpVersionPolicy)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (8)
420(request.Version.Major >= 3 || (request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher && IsSecure)) && 446if (request.Version.Major >= 3 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 453(request.Version.Major >= 2 || (request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher && IsSecure)) && 454(request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower || IsSecure)) // prefer HTTP/1.1 if connection is not secured and downgrade is possible 483if (request.Version.Major >= 2 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 535if (request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 725if (request.Version.Major >= 2 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 730if (request.Version.Major >= 2 || request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
614if (request.Version.Major >= 3 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
589if (request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher)
System.Net.WebSockets.Client (9)
System\Net\WebSockets\ClientWebSocketOptions.cs (3)
31private HttpVersionPolicy _versionPolicy = HttpVersionPolicy.RequestVersionOrLower; 62public HttpVersionPolicy HttpVersionPolicy
System\Net\WebSockets\WebSocketHandle.Managed.cs (6)
54if (options.HttpVersion.Major >= 2 || options.HttpVersionPolicy == HttpVersionPolicy.RequestVersionOrHigher) 71bool tryDowngrade = uri.Scheme == UriScheme.Ws && (options.HttpVersion == HttpVersion.Version11 || options.HttpVersionPolicy == HttpVersionPolicy.RequestVersionOrLower); 81|| (options.HttpVersion == HttpVersion.Version11 && options.HttpVersionPolicy == HttpVersionPolicy.RequestVersionOrHigher && uri.Scheme == UriScheme.Wss)) 83if (options.HttpVersion > HttpVersion.Version20 && options.HttpVersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 140&& (options.HttpVersion == HttpVersion.Version11 || options.HttpVersionPolicy == HttpVersionPolicy.RequestVersionOrLower)) 383request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;