From 14bad1de9e8771d01a4464086811a4d1ad6f6380 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 2 May 2024 10:15:25 +0200 Subject: [PATCH] Rename http3Only to requireUnreliable This should be more future proof. Also tidy up the language a bit. Fixes #1744. --- fetch.bs | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/fetch.bs b/fetch.bs index 5ac23d961..e35715bcd 100644 --- a/fetch.bs +++ b/fetch.bs @@ -2865,8 +2865,9 @@ steps: network partition key key, URL url, boolean credentials, an optional new connection setting new (default "no"), and an optional boolean -http3Only (default false), run these steps: - +requireUnreliable (default false), run these +steps: +
  1. @@ -2878,11 +2879,11 @@ steps: origin is url's origin, and credentials is credentials. -
  2. If connections is not empty and http3Only is false, then return - one of connections. +

  3. If connections is not empty and requireUnreliable is false, then + return one of connections. -

  4. If there is an HTTP/3 connection in connections, then return that - connection. +

  5. If there is a connection capable of supporting unreliable transport in + connections, e.g., HTTP/3, then return that connection.

  • @@ -2920,8 +2921,8 @@ steps:

    Let connection be the result of running this step: run create a connection given key, url's origin, credentials, proxy, an implementation-defined host from hosts, - timingInfo, and http3Only an implementation-defined number of - times, in parallel from each other, and wait for at least 1 to return a value. In an + timingInfo, and requireUnreliable an implementation-defined number + of times, in parallel from each other, and wait for at least 1 to return a value. In an implementation-defined manner, select a value to return from the returned values and return it. Any other returned values that are connections may be closed. @@ -2955,7 +2956,7 @@ reused across connections whose credentials are fal

    To create a connection, given a network partition key key, origin origin, boolean credentials, string proxy, host host, connection timing info timingInfo, and -boolean http3Only, run these steps: +boolean requireUnreliable, run these steps:

    1. Set timingInfo's connection start time to the @@ -2971,16 +2972,19 @@ boolean http3Only, run these steps: [[!HTTP1]] [[!TLS]]

        -
      • If http3Only is true, then establish an HTTP/3 connection. [[!HTTP3]] +

      • If requireUnreliable is true, then establish a connection capable of unreliable + transport, e.g., an HTTP/3 connection. [[!HTTP3]] -

      • When establishing an HTTP/3 connection, include SETTINGS_ENABLE_WEBTRANSPORT with a value - of 1 and H3_DATAGRAM with a value of 1 in the initial SETTINGS frame. [[!WEBTRANSPORT-HTTP3]] - [[!HTTP3-DATAGRAM]] +

      • When establishing a connection capable of unreliable transport, enable options that are + necessary for WebTransport. For HTTP/3, this means including + SETTINGS_ENABLE_WEBTRANSPORT with a value of 1 and + H3_DATAGRAM with a value of 1 in the initial SETTINGS + frame. [[!WEBTRANSPORT-HTTP3]] [[!HTTP3-DATAGRAM]]

      • If credentials is false, then do not send a TLS client certificate. -

      • If establishing a connection does not succeed (e.g., a TCP or TLS error), then return - failure. +

      • If establishing a connection does not succeed (e.g., a UDP, TCP, or TLS error), then + return failure.