66 writes to VersionPolicy
IIS.FunctionalTests (1)
Http3Tests.cs (1)
69
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
InMemory.FunctionalTests (7)
EventSourceTests.cs (1)
192
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
Http2\Http2EndToEndTests.cs (1)
69
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
KestrelMetricsTests.cs (5)
571
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
650
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
728
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
809
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
897
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
Interop.FunctionalTests (49)
Http2\Http2RequestTests.cs (4)
128
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
185
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
211
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
295
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
Http3\Http3RequestTests.cs (37)
91
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
150
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
252
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
296
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
377
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
420
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
491
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
562
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
621
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
677
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
727
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
817
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
853
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
864
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
913
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
926
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
942
request3.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
1016
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1113
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1259
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1318
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1372
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1424
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1434
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1491
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1502
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1543
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1561
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1605
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1665
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1721
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1841
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1887
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
1964
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
2041
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
2141
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
2194
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
Http3\Http3TlsTests.cs (7)
58
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
105
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
147
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
196
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
246
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
324
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
475
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
HttpClientHttp2InteropTests.cs (1)
1701
VersionPolicy
= HttpVersionPolicy.RequestVersionExact,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Http3Tests.cs (1)
77
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
WebHostTests.cs (6)
81
request.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
247
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
261
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
318
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
331
request2.
VersionPolicy
= HttpVersionPolicy.RequestVersionOrHigher;
354
request1.
VersionPolicy
= HttpVersionPolicy.RequestVersionExact;
System.Net.Http (1)
System\Net\Http\HttpClient.cs (1)
814
new HttpRequestMessage(method, uri) { Version = _defaultRequestVersion,
VersionPolicy
= _defaultVersionPolicy };
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
383
request.
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)
64
request.
VersionPolicy
);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (10)
420
(request.Version.Major >= 3 || (request.
VersionPolicy
== HttpVersionPolicy.RequestVersionOrHigher && IsSecure)) &&
446
if (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
483
if (request.Version.Major >= 2 && request.
VersionPolicy
!= HttpVersionPolicy.RequestVersionOrLower)
535
if (request.
VersionPolicy
!= HttpVersionPolicy.RequestVersionOrLower)
537
throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.
VersionPolicy
), e);
725
if (request.Version.Major >= 2 && request.
VersionPolicy
!= HttpVersionPolicy.RequestVersionOrLower)
730
if (request.Version.Major >= 2 || request.
VersionPolicy
== HttpVersionPolicy.RequestVersionOrHigher)
871
HttpRequestException 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)
621
if (request.Version.Major >= 3 && request.
VersionPolicy
!= HttpVersionPolicy.RequestVersionOrLower)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (2)
589
if (request.
VersionPolicy
== HttpVersionPolicy.RequestVersionOrHigher)
591
throw new NotSupportedException(SR.Format(SR.net_http_upgrade_not_enabled_sync, nameof(Send), request.
VersionPolicy
));