66 writes to VersionPolicy
IIS.FunctionalTests (1)
Http3Tests.cs (1)
69request.VersionPolicy = 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 (49)
Http2\Http2RequestTests.cs (4)
128request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 185request1.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 211request.VersionPolicy = HttpVersionPolicy.RequestVersionExact; 295request.VersionPolicy = 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 (1)
1701VersionPolicy = HttpVersionPolicy.RequestVersionExact,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Http3Tests.cs (1)
77request.VersionPolicy = 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;
System.Net.Http (1)
System\Net\Http\HttpClient.cs (1)
821new HttpRequestMessage(method, uri) { Version = _defaultRequestVersion, VersionPolicy = _defaultVersionPolicy };
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
383request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
15 references to VersionPolicy
System.Net.Http (15)
System\Net\Http\HttpClient.cs (1)
64/// Gets or sets the default value of <see cref="HttpRequestMessage.VersionPolicy" /> for implicitly created requests in convenience methods,
System\Net\Http\HttpTelemetry.cs (1)
64request.VersionPolicy);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (10)
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) 537throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e); 725if (request.Version.Major >= 2 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower) 730if (request.Version.Major >= 2 || request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher) 847HttpRequestException ex = new(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_cannot_establish, request.Version, request.VersionPolicy, desiredVersion), inner);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
614if (request.Version.Major >= 3 && request.VersionPolicy != HttpVersionPolicy.RequestVersionOrLower)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (2)
589if (request.VersionPolicy == HttpVersionPolicy.RequestVersionOrHigher) 591throw new NotSupportedException(SR.Format(SR.net_http_upgrade_not_enabled_sync, nameof(Send), request.VersionPolicy));