Re: [whatwg/fetch] Add more parameters to "obtain a connection" (#1171)

@jan-ivar approved this pull request.

I've highlighted more consistently. _http3Only_ might be the preferred dromedaryCase here.



>  <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>sharable</var> is true, 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>forHTTP3</var> is false, then return

```suggestion
   <li><p>If <var>connections</var> is not empty and <var>http3Only</var> is false, then return
```

> @@ -2145,6 +2176,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>forHTTP3</var> is true, then establish an HTTP/3 connection. [[!HTTP3]]

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

> @@ -2127,12 +2145,25 @@ 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>forHTTP3</var></dfn> (default: false), and an optional
+boolean <dfn export for=obtain-a-connection><var>sharable</var></dfn> (default: true), run these

```suggestion
boolean <var>shareable</var> (default true), run these
```

>  <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>sharable</var> is true, then:

```suggestion
  <p>If <var>shareable</var> is true, then:
```

> @@ -2160,9 +2197,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>sharable</var> is true, then add <var>connection</var> to the user agent's

```suggestion
 <li><p>If <var>shareable</var> is true, then add <var>connection</var> to the user agent's
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1171#pullrequestreview-602440624

Received on Wednesday, 3 March 2021 02:08:35 UTC