Skip to content

Commit

Permalink
Add http3Only and dedicated parameters to "obtain a connection"
Browse files Browse the repository at this point in the history
For WebTransport, see: w3c/webtransport#128.
  • Loading branch information
yutakahirano authored Mar 4, 2021
1 parent f2a7922 commit e5b330d
Showing 1 changed file with 46 additions and 7 deletions.
53 changes: 46 additions & 7 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2;
"href": "https://tools.ietf.org/html/draft-ietf-httpbis-header-structure",
"publisher": "IETF",
"title": "Structured Field Values for HTTP"
},
"HTTP3": {
"authors": ["M. Bishop, Ed."],
"href": "https://tools.ietf.org/html/draft-ietf-quic-http",
"publisher": "IETF",
"title": "Hypertext Transfer Protocol Version 3 (HTTP/3)"
},
"WEBTRANSPORT-HTTP3": {
"authors": ["V. Vasiliev"],
"href": "https://tools.ietf.org/html/draft-ietf-webtrans-http3",
"publisher": "IETF",
"title": "WebTransport over HTTP/3"
},
"HTTP3-DATAGRAM": {
"authors": ["David Schinazi", "Lucas Pardue"],
"href": "https://tools.ietf.org/html/draft-ietf-masque-h3-datagram",
"publisher": "IETF",
"title": "Using QUIC Datagrams with HTTP/3"
}
}
</pre>
Expand Down Expand Up @@ -2121,12 +2139,27 @@ identified by a <b>key</b> (a <a>network partition key</a>), an <b>origin</b> (a
<a for=/>origin</a>), and <b>credentials</b> (a boolean).

<p>To <dfn export id=concept-connection-obtain>obtain a connection</dfn>, given a <var>key</var>,
<var>origin</var>, and <var>credentials</var>, run these steps:
<var>origin</var>, <var>credentials</var>, an optional boolean
<dfn export for="obtain a connection"><var>http3Only</var></dfn> (default: false), and an optional
boolean <dfn export for="obtain a connection"><var>dedicated</var></dfn> (default: false), run these
steps:
<!-- http3Only and dedicated have been added for WebTransport -->

<ol>
<li><p>If the user agent's <a>connection pool</a> contains a <a>connection</a> whose <b>key</b> is
<var>key</var>, <b>origin</b> is <var>origin</var>, and <b>credentials</b> is
<var>credentials</var>, then return that <a>connection</a>.
<li>
<p>If <var>dedicated</var> is false, then:

<ol>
<li><p>Let <var>connections</var> be a set of <a>connections</a> in the user agent's
<a>connection pool</a> each of whose <b>key</b> is <var>key</var>, <b>origin</b> is
<var>origin</var>, and <b>credentials</b> is <var>credentials</var>.

<li><p>If <var>connections</var> is not empty and <var>http3Only</var> is false, then return
one of <var>connections</var>.

<li><p>If there is an HTTP/3 <a>connection</a> in <var>connections</var>, then return that
<a>connection</a>.
</ol>

<li><p>Let <var>connection</var> be null.

Expand All @@ -2139,6 +2172,12 @@ identified by a <b>key</b> (a <a>network partition key</a>), an <b>origin</b> (a
<var>origin</var>. [[!HTTP]] [[!HTTP-SEMANTICS]] [[!HTTP-COND]] [[!HTTP-CACHING]] [[!HTTP-AUTH]]
[[!TLS]]

<p>If <var>http3Only</var> is true, then establish an HTTP/3 connection. [[!HTTP3]]

<p>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]]

<p>If <var>credentials</var> is false, then do <em>not</em> send a TLS client certificate.

<p>If establishing a connection does not succeed (e.g., a DNS, TCP, or TLS error), then return
Expand All @@ -2154,9 +2193,9 @@ identified by a <b>key</b> (a <a>network partition key</a>), an <b>origin</b> (a
<li><p>Return failure.
</ol>

<li><p>Add <var>connection</var> to the user agent's <a>connection pool</a> with <b>key</b> being
<var>key</var>, <b>origin</b> being <var>origin</var>, and <b>credentials</b> being
<var>credentials</var>.
<li><p>If <var>dedicated</var> is false, then add <var>connection</var> to the user agent's
<a>connection pool</a> with <b>key</b> being <var>key</var>, <b>origin</b> being <var>origin</var>,
and <b>credentials</b> being <var>credentials</var>.

<li><p>Return <var>connection</var>.
</ol>
Expand Down

0 comments on commit e5b330d

Please sign in to comment.