Επεξεργασία

Κοινή χρήση μέσω


HttpVersionPolicy Enum

Definition

Specifies behaviors for selecting and negotiating the HTTP version for a request.

public enum class HttpVersionPolicy
public enum HttpVersionPolicy
type HttpVersionPolicy = 
Public Enum HttpVersionPolicy
Inheritance
HttpVersionPolicy

Fields

Name Value Description
RequestVersionOrLower 0

Use the requested version or downgrade to a lower one. This is the default behavior.

If the server supports the requested version, either negotiated via ALPN (H2) or advertised via Alt-Svc (H3), and a secure connection is being requested, the result is the Version. Otherwise, the version downgrades to HTTP/1.1. This option does not allow use of a prenegotiated clear text connection, for example, H2C.

RequestVersionOrHigher 1

Use the highest available version, downgrading only to the requested version but not below.

If the server supports a higher version than the requested version (either negotiated via ALPN (H2) or advertised via Alt-Svc (H3)) and a secure connection is requested, the result is the highest available version. Otherwise, the version downgrades to Version. This option allows use of a prenegotiated clear text connection for the requested version but not for a higher version.

RequestVersionExact 2

Only use the requested version.

This option allows for use of a prenegotiated clear text connection for the requested version.

Applies to