HttpsUpgradeOptions Class
The settings of the HTTPS upgrades (https://github.com/whatwg/fetch/pull/1655, BrowsingContextOptions.HttpsUpgrades): the http: URL of a top-level navigation is fetched over https: first, and over http: when the https: request fails.
public sealed class HttpsUpgradeOptionsConstructors
| Name | Description |
|---|---|
| HttpsUpgradeOptions() |
HttpsUpgradeOptions()
public HttpsUpgradeOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Default | Gets the settings of the HTTPS upgrades as the browsers apply them (all the properties have their default value). |
| FallbackTimeout | Gets or sets the time after which an upgraded request that has no response yet is canceled, so that the navigation falls back to http: without waiting for the timeout of the network (a server that drops the connections to the port of HTTPS). The time is measured with BrowsingContextOptions.TimeProvider. The default is null: the navigation waits for the response or the error of the DocumentLoader. Chromium uses 3 seconds. |
| UpgradeNonDefaultPorts | Gets or sets whether the URLs whose port is not the default port of http: (80) are upgraded, keeping their port (http://example.com:8080/ becomes https://example.com:8080/). A server rarely serves HTTP and HTTPS on the same port, so the default is false, as in the specification and the browsers. Test servers that serve HTTPS on the port of the http: URL (as the web-platform-tests expect) need it. |
| UpgradeNonUniqueHosts | Gets or sets whether the hosts that are not unique are upgraded: the single-label hosts (http://intranet/) and the domains whose top-level domain is not in the public suffix list (.test, .local, .internal, .lan...), which resolve in a private network only. The default is false, as in Chromium. The IP addresses and the potentially trustworthy hosts (localhost) are never upgraded. |
Default
HttpsUpgrading.csGets the settings of the HTTPS upgrades as the browsers apply them (all the properties have their default value).
public static HttpsUpgradeOptions Default { get; }Property value
FallbackTimeout
HttpsUpgrading.csGets or sets the time after which an upgraded request that has no response yet is canceled, so that the navigation falls back to http: without waiting for the timeout of the network (a server that drops the connections to the port of HTTPS). The time is measured with BrowsingContextOptions.TimeProvider. The default is null: the navigation waits for the response or the error of the DocumentLoader. Chromium uses 3 seconds.
public TimeSpan? FallbackTimeout { get; init; }Property value
UpgradeNonDefaultPorts
HttpsUpgrading.csGets or sets whether the URLs whose port is not the default port of http: (80) are upgraded, keeping their port (http://example.com:8080/ becomes https://example.com:8080/). A server rarely serves HTTP and HTTPS on the same port, so the default is false, as in the specification and the browsers. Test servers that serve HTTPS on the port of the http: URL (as the web-platform-tests expect) need it.
public bool UpgradeNonDefaultPorts { get; init; }Property value
UpgradeNonUniqueHosts
HttpsUpgrading.csGets or sets whether the hosts that are not unique are upgraded: the single-label hosts (http://intranet/) and the domains whose top-level domain is not in the public suffix list (.test, .local, .internal, .lan...), which resolve in a private network only. The default is false, as in Chromium. The IP addresses and the potentially trustworthy hosts (localhost) are never upgraded.
public bool UpgradeNonUniqueHosts { get; init; }