Skip to content
31 changes: 26 additions & 5 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,21 @@ downloads. This format of range header value can be set using <a>add a range hea
have this value start with `<code>Mozilla/5.0 (</code>` and be generally modeled after other web
browsers.

<div algorithm>
<p>To get the <a>environment settings object</a> <var>environment</var>'s
<dfn export>environment default `<code>User-Agent</code>` value</dfn>:

<ol>
<li><p>Let <var>userAgent</var> be the <a>WebDriver BiDi emulated User-Agent</a> for
<var>environment</var>.

<li><p>If <var>userAgent</var> is non-null, then return <var>userAgent</var>,
<a>isomorphic encoded</a>.

<li><p>Return the <a>default `<code>User-Agent</code>` value</a>.
</ol>
</div>

<p>The <dfn>document `<code>Accept</code>` header value</dfn> is
`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`.

Expand Down Expand Up @@ -5986,11 +6001,17 @@ run these steps:
the <a data-lt="structured field token">token</a> <code>prefetch</code>) in
<var>httpRequest</var>'s <a for=request>header list</a>.

<li><p>If <var>httpRequest</var>'s <a for=request>header list</a>
<a for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should
<a for="header list">append</a> (`<code>User-Agent</code>`,
<a>default `<code>User-Agent</code>` value</a>) to <var>httpRequest</var>'s
<a for=request>header list</a>.
<li>
<p>If <var>httpRequest</var>'s <a for=request>header list</a> <a
for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should:

<ol>
<li><p>Let <var>userAgent</var> be <var>httpRequest</var>'s <a for=request>client</a>'s
<a>environment default `<code>User-Agent</code>` value</a>.

<li><p><a for="header list">Append</a> (`<code>User-Agent</code>`, <var>userAgent</var>) to
<var>httpRequest</var>'s <a for=request>header list</a>.
</ol>

<li><p>If <var>httpRequest</var>'s <a for=request>cache mode</a> is "<code>default</code>" and
<var>httpRequest</var>'s <a for=request>header list</a> <a for="header list">contains</a>
Expand Down