@@ -2244,9 +2244,6 @@ be used as part of the cache key.
2244
2244
<li><p> If <var> origin</var> 's <a for=origin>host</a> is an <a for=/>IP address</a> , then return
2245
2245
« <var> origin</var> 's <a for=origin>host</a> ».
2246
2246
2247
- <li><p> If the user agent is configured to use a proxy that resolves domains on its own, then return
2248
- « <var> origin</var> 's <a for=origin>host</a> ».
2249
-
2250
2247
<li><p> Return the result of running <a>resolve a domain</a> given <var> key</var> and
2251
2248
<var> origin</var> 's <a for=origin>host</a> .
2252
2249
</ol>
@@ -2324,23 +2321,25 @@ steps:
2324
2321
2325
2322
<hr>
2326
2323
2324
+ <p> A <dfn>new connection setting</dfn> is "<code> no</code> ", "<code> yes</code> ", or
2325
+ "<code> yes-and-dedicated</code> ".
2326
+
2327
2327
<p> To <dfn export id=concept-connection-obtain>obtain a connection</dfn> , given a
2328
- <a>network partition key</a> <var> key</var> , <a for=/>origin</a> <var> origin</var> , boolean
2329
- <var> credentials</var> , an optional boolean <var> forceNew</var> (default false), an optional boolean
2330
- <dfn export for="obtain a connection"><var>http3Only</var></dfn> (default false), and an optional
2331
- boolean <dfn export for="obtain a connection"><var>dedicated</var></dfn> (default false), run these
2332
- steps:
2333
- <!-- http3Only and dedicated have been added for WebTransport -->
2328
+ <a>network partition key</a> <var> key</var> , <a for=/>URL</a> <var> url</var> , boolean
2329
+ <var> credentials</var> , an optional <a>new connection setting</a> <var> new</var> (default
2330
+ "<code> no</code> "), and an optional boolean
2331
+ <dfn export for="obtain a connection"><var>http3Only</var></dfn> (default false), run these steps:
2332
+ <!-- new's "yes-and-dedicated" and http3Only have been added for WebTransport -->
2334
2333
2335
2334
<ol>
2336
2335
<li>
2337
- <p> If <var> forceNew </var> is false or <var> dedicated </var> is false , then:
2336
+ <p> If <var> new </var> is " <code> no </code> " , then:
2338
2337
2339
2338
<ol>
2340
2339
<li><p> Let <var> connections</var> be a set of <a>connections</a> in the user agent's
2341
2340
<a>connection pool</a> whose <a for=connection>key</a> is <var> key</var> ,
2342
- <a for=connection>origin</a> is <var> origin </var> , and <a for=connection>credentials </a> is
2343
- <var> credentials</var> .
2341
+ <a for=connection>origin</a> is <var> url </var> 's <a for=url>origin </a> , and
2342
+ <a for=connection>credentials</a> is < var> credentials</var> .
2344
2343
2345
2344
<li><p> If <var> connections</var> is not empty and <var> http3Only</var> is false, then return
2346
2345
one of <var> connections</var> .
@@ -2349,38 +2348,59 @@ steps:
2349
2348
<a>connection</a> .
2350
2349
</ol>
2351
2350
2351
+ <li>
2352
+ <p> Let <var> proxies</var> be the result of finding proxies for <var> url</var> in an
2353
+ <a>implementation-defined</a> manner. If there are no proxies, let <var> proxies</var> be
2354
+ « "<code> DIRECT</code> " ».
2355
+
2356
+ <p class=note> This is where non-standard technology such as
2357
+ <a href="https://en.wikipedia.org/wiki/Web_Proxy_Auto-Discovery_Protocol">Web Proxy Auto-Discovery Protocol (WPAD)</a>
2358
+ and <a href="https://en.wikipedia.org/wiki/Proxy_auto-config">proxy auto-config (PAC)</a> come
2359
+ into play. The "<code> DIRECT</code> " value means to not use a proxy for this particular
2360
+ <var> url</var> .
2361
+
2352
2362
<li><p> Let <var> timingInfo</var> be a new <a for=/>connection timing info</a> .
2353
2363
2354
- <li><p> Set <var> timingInfo</var> 's <a for="connection timing info">domain lookup start time</a> to
2355
- the <a for=/>unsafe shared current time</a> .
2364
+ <li>
2365
+ <p> <a for=list>For each</a> <var> proxy</var> of <var> proxies</var> :
2366
+
2367
+ <ol>
2368
+ <li><p> Set <var> timingInfo</var> 's <a for="connection timing info">domain lookup start time</a>
2369
+ to the <a for=/>unsafe shared current time</a> .
2356
2370
2357
- <li><p> Let <var> hosts</var> be the result of running <a>resolve an origin</a> given <var> key</var>
2358
- and <var> origin</var> .
2371
+ <li><p> Let <var> hosts</var> be « <var> origin</var> 's <a for=origin>host</a> ».
2359
2372
2360
- <li><p> If <var> hosts</var> is failure, then return failure.
2373
+ <li><p> If <var> proxy</var> is "<code> DIRECT</code> ", then set <var> hosts</var> to the result of
2374
+ running <a>resolve an origin</a> given <var> key</var> and <var> url</var> 's <a for=url>origin</a> .
2361
2375
2362
- <li><p> Set <var> timingInfo</var> 's <a for="connection timing info">domain lookup end time</a> to
2363
- the <a for=/>unsafe shared current time</a> .
2376
+ <li><p> If <var> hosts</var> is failure, then <a for=iteration>continue</a> .
2364
2377
2365
- <li>
2366
- <p> Let <var> connection</var> be the result of running this step: run <a>create a connection</a>
2367
- given <var> key</var> , <var> origin</var> , <var> credentials</var> , an <a>implementation-defined</a>
2368
- <a for=/>host</a> from <var> hosts</var> , <var> timingInfo</var> , and <var> http3Only</var> an
2369
- <a>implementation-defined</a> number of times, <a>in parallel</a> from each other, and wait for at
2370
- least 1 to return a value. In an <a>implementation-defined</a> manner, select a value to return
2371
- from the returned values and return it. Any other returned values that are <a>connections</a> may
2372
- be closed.
2378
+ <li><p> Set <var> timingInfo</var> 's <a for="connection timing info">domain lookup end time</a> to
2379
+ the <a for=/>unsafe shared current time</a> .
2373
2380
2374
- <p class=note> Essentially this allows an implementation to pick one or more
2375
- <a for=/>IP addresses</a> from the return value of <a>resolve a domain</a> (assuming no proxy) and
2376
- race them against each other, favor <a for=/>IPv6 addresses</a> , retry in case of a timeout, etc.
2381
+ <li>
2382
+ <p> Let <var> connection</var> be the result of running this step: run <a>create a connection</a>
2383
+ given <var> key</var> , <var> url</var> 's <a for=url>origin</a> , <var> credentials</var> ,
2384
+ <var> proxy</var> , an <a>implementation-defined</a> <a for=/>host</a> from <var> hosts</var> ,
2385
+ <var> timingInfo</var> , and <var> http3Only</var> an <a>implementation-defined</a> number of
2386
+ times, <a>in parallel</a> from each other, and wait for at least 1 to return a value. In an
2387
+ <a>implementation-defined</a> manner, select a value to return from the returned values and
2388
+ return it. Any other returned values that are <a>connections</a> may be closed.
2377
2389
2378
- <li><p> If <var> connection</var> is failure, then return failure.
2390
+ <p class=note> Essentially this allows an implementation to pick one or more
2391
+ <a for=/>IP addresses</a> from the return value of <a>resolve a domain</a> (assuming
2392
+ <var> proxy</var> is "<code> DIRECT</code> ") and race them against each other, favor
2393
+ <a for=/>IPv6 addresses</a> , retry in case of a timeout, etc.
2379
2394
2380
- <li><p> If <var> dedicated</var> is false, then <a for=set>append</a> <var> connection</var> to the
2381
- user agent's <a>connection pool</a> .
2395
+ <li><p> If <var> connection</var> is failure, then <a for=iteration>continue</a> .
2382
2396
2383
- <li><p> Return <var> connection</var> .
2397
+ <li><p> If <var> new</var> is not "<code> yes-and-dedicated</code> ", then <a for=set>append</a>
2398
+ <var> connection</var> to the user agent's <a>connection pool</a> .
2399
+
2400
+ <li><p> Return <var> connection</var> .
2401
+ </ol>
2402
+
2403
+ <li><p> Return failure.
2384
2404
</ol>
2385
2405
2386
2406
<p class=note> This is intentionally a little vague as there are a lot of nuances to connection
@@ -2393,9 +2413,9 @@ reused across <a>connections</a> whose <a for=connection>credentials</a> are fal
2393
2413
<hr>
2394
2414
2395
2415
<p> To <dfn>create a connection</dfn> , given a <a for=/>network partition key</a> <var> key</var> ,
2396
- <a for=/>origin</a> <var> origin</var> , boolean <var> credentials</var> , <a for=/>host</a>
2397
- <var> host</var> , <a for=/>connection timing info</a> <var> timingInfo</var> , and boolean
2398
- <var> http3Only</var> , run these steps:
2416
+ <a for=/>origin</a> <var> origin</var> , boolean <var> credentials</var> , string <var> proxy </var> ,
2417
+ <a for=/>host</a> < var> host</var> , <a for=/>connection timing info</a> <var> timingInfo</var> , and
2418
+ boolean <var> http3Only</var> , run these steps:
2399
2419
2400
2420
<ol>
2401
2421
<li><p> Set <var> timingInfo</var> 's <a for="connection timing info">connection start time</a> to the
@@ -2407,8 +2427,8 @@ reused across <a>connections</a> whose <a for=connection>credentials</a> are fal
2407
2427
<a for=connection>credentials</a> is <var> credentials</var> , and <a for=connection>timing info</a>
2408
2428
is <var> timingInfo</var> . <a for=/>Record connection timing info</a> given <var> connection</var>
2409
2429
and use <var> connection</var> to establish an HTTP connection to <var> host</var> , taking
2410
- <var> origin</var> into account. [[!HTTP]] [[!HTTP-SEMANTICS]] [[!HTTP-COND]] [[!HTTP-CACHING ]]
2411
- [[!HTTP-AUTH]] [[!TLS]]
2430
+ <var> proxy </var> and <var> origin</var> into account. [[!HTTP]] [[!HTTP-SEMANTICS]] [[!HTTP-COND]]
2431
+ [[!HTTP-CACHING]] [[!HTTP- AUTH]] [[!TLS]]
2412
2432
2413
2433
<p> If <var> http3Only</var> is true, then establish an HTTP/3 connection. [[!HTTP3]]
2414
2434
@@ -5155,6 +5175,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
5155
5175
<li><p> Let <var> networkPartitionKey</var> be the result of
5156
5176
<a for=request>determining the network partition key</a> given <var> request</var> .
5157
5177
5178
+ <li><p> Let <var> newConnection</var> be "<code> yes</code> " if <var> forceNewConnection</var> is true;
5179
+ otherwise "<code> no</code> ".
5180
+
5158
5181
<li>
5159
5182
<p> Switch on <var> request</var> 's <a for=request>mode</a> :
5160
5183
@@ -5167,8 +5190,8 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
5167
5190
<dt> Otherwise
5168
5191
<dd><p> Let <var> connection</var> be the result of
5169
5192
<a lt="obtain a connection">obtaining a connection</a> , given <var> networkPartitionKey</var> ,
5170
- <var> request</var> 's <a for=request>current URL</a>' s <a for=url>origin</a> ,
5171
- <var> includeCredentials </var> , and <var> forceNewConnection </var> .
5193
+ <var> request</var> 's <a for=request>current URL</a> , <var> includeCredentials </var> , and
5194
+ <var> newConnection </var> .
5172
5195
</dl>
5173
5196
5174
5197
<li>
0 commit comments