diff --git a/index.bs b/index.bs
index 8415770..7da2764 100644
--- a/index.bs
+++ b/index.bs
@@ -75,6 +75,7 @@ spec:infra; type:dfn; for:/; text:set
spec:streams; type:interface; text:ReadableStream
spec:fetch; type:dfn; for:/; text:fetch
spec:fetch; type:dfn; for:/; text:credentials
+spec:fetch; type:dfn; for:fetch record; text:request
spec:url; type:dfn; text:scheme
spec:url; type:dfn; text:fragment
spec:infra; type:dfn; for:/; text:ASCII case-insensitive
@@ -853,6 +854,18 @@ A {{WebTransport}} object has the following internal slots.
-To
initialize WebTransport over HTTP, given a {{WebTransport}} object
-
transport, a [=URL record=] |url|, a boolean |dedicated|, a boolean
-|requireUnreliable|, a {{WebTransportCongestionControl}} |congestionControl|,
-a |protocols| array, and a
-sequence<{{WebTransportHash}}> |serverCertificateHashes|, run these steps.
+Note: The plan is for [=fetch=] to call into the below algorithm based off a
+new "`webtransport`" [=request/mode=]. [#1808](https://github.com/whatwg/fetch/issues/1808).
-1. Let |client| be |transport|'s [=relevant settings object=].
-1. Let |origin| be |client|'s [=environment settings object/origin=].
-1. Let |request| be a new [=/request=] whose [=request/URL=] is |url|, [=request/client=] is
- |client|, [=request/policy container=] is |client|'s
- [=environment settings object/policy container=], [=request/destination=] is an empty string,
- [=request/origin=] is |origin| and [=request/redirect mode=] is "error".
-1. Run
report Content Security Policy violations for |request|.
-1. If [=should request be blocked by Content Security Policy?=] with |request| returns
-
"Blocked", or if |request| [=block bad port|should be blocked due to a bad port=]
- returns
blocked, then abort the remaining steps and [=queue a network task=] with |transport|
- to run these steps:
- 1. If |transport|.{{[[State]]}} is `"closed"` or `"failed"`, then abort these steps.
- 1. Let |error| be a newly [=DOMException/created=] {{WebTransportError}} whose
- {{WebTransportErrorOptions/source}} is `"session"`.
- 1. [=Cleanup=] |transport| with |error|.
-1. Let |networkPartitionKey| be the result of [=determining the network partition key=] with
- |transport|'s [=relevant settings object=].
-1. Run the following steps [=in parallel=], but [=abort when=] |transport|.{{[[State]]}} becomes `"closed"` or `"failed"`:
- 1. Let |newConnection| be "`no`" if |dedicated| is false; otherwise "`yes-and-dedicated`".
- 1. Let |connection| be the result of [=obtain a connection|obtaining a connection=] with
- |networkPartitionKey|, |url|, false, |newConnection|, and |requireUnreliable|. If the user agent
- supports more than one congestion control algorithm, choose one appropriate for
- |congestionControl| for sending of data on this |connection|. When obtaining a connection, if
+
+To obtain a WebTransport connection, given a [=network partition key=]
+|networkPartitionKey|, and a [=request=] |request|, run these steps:
+ 1. Let |transport| be the {{WebTransport}} object associated with |request|.
+ 1. Let |url| be |request|'s [=request/current URL=].
+ 1. Let |newConnection| be |transport|.{{[[NewConnection]]}}.
+ 1. Let |requireUnreliable| be |transport|.{{[[RequireUnreliable]]}}.
+ 1. Let |serverCertificateHashes| be the values in |transport|.{{[[ServerCertificateHashes]]}}.
+ 1. Return the result of [=obtain a connection|obtaining a connection=] with
+ |networkPartitionKey|, |url|, false, |newConnection|, and |requireUnreliable|.
+ When obtaining a connection, if
|serverCertificateHashes| is specified, instead of using the default certificate verification
algorithm, consider the certificate valid if it meets the [=custom certificate
requirements=] and if [=verify a certificate hash|verifying the certificate hash=] against
- |serverCertificateHashes| returns true. If either condition is not met, let |connection| be
- failure.
- 1. If |connection| is failure, then abort the remaining steps and [=queue a network task=] with
+ |serverCertificateHashes| returns true. If either condition is not met, fail with a
+ [=network error=].
+
+
+
+To process a WebTransport fetch response, given a |response|, |origin|, |protocols|, and |congestionControl|, run these steps:
+ 1. If |response| is [=network error=], then abort the remaining steps and [=queue a network task=] with
|transport| to run these steps:
1. If |transport|.{{[[State]]}} is `"closed"` or `"failed"`, then abort these steps.
1. Let |error| be a newly [=DOMException/created=] {{WebTransportError}} whose
@@ -1006,6 +1024,7 @@ sequence<{{WebTransportHash}}> |serverCertificateHashes|, run these steps.
information that would normally be blocked by CORS. In same-origin contexts, it might
encourage applications to abuse the handshake as a vector for passing information.
+ 1. Let |connection| be the underlying connection associated with |response|.
1. Wait for |connection| to receive the first SETTINGS frame, and let |settings| be a dictionary that
represents the SETTINGS frame.
1. If |settings| doesn't contain SETTINGS_ENABLE_WEBTRANPORT with a value of 1, or it doesn't
@@ -1026,6 +1045,8 @@ sequence<{{WebTransportHash}}> |serverCertificateHashes|, run these steps.
{{WebTransportErrorOptions/source}} is `"session"`.
1. [=Cleanup=] |transport| with |error|.
1. Let |session| be the established [=WebTransport session=].
+ 1. If the user agent supports more than one congestion control algorithm, choose one
+ appropriate for |congestionControl| for sending of data on this |connection|.
1. [=Queue a network task=] with |transport| to run these steps:
1. Assert: [=this=]'s {{[[Datagrams]]}}'s {{[[OutgoingMaxDatagramSize]]}} is an integer.
1. If |transport|.{{[[State]]}} is not `"connecting"`:
@@ -1433,7 +1454,7 @@ run these steps:
## Context cleanup steps ## {#web-transport-context-cleanup-steps}
-This specification defines context cleanup steps as the following steps, given
+This specification defines context cleanup steps as the following steps, given
{{WebTransport}} |transport|:
1. If |transport|.{{[[State]]}} is `"connected"`, then: