Skip to content

Commit b677da0

Browse files
environment default <code>User-Agent</code> value
# Conflicts: # fetch.bs
1 parent 1c19de8 commit b677da0

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

fetch.bs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,24 @@ downloads. This format of range header value can be set using <a>add a range hea
14201420
have this value start with `<code>Mozilla/5.0 (</code>` and be generally modeled after other web
14211421
browsers.
14221422

1423+
<div algorithm>
1424+
<p>To get the <dfn export id=environment-default-user-agent-value>environment default `<code>User-Agent</code>` value</dfn>
1425+
for an <a>environment settings object</a> <var>environment</var>:
1426+
1427+
<ol>
1428+
<li><p>Let <var>userAgent</var> be the <a>WebDriver BiDi emulated User-Agent</a> for
1429+
<var>environment</var>.
1430+
1431+
<li><p>If <var>userAgent</var> is not null, then set <var>userAgent</var> to
1432+
<a>isomorphic encoded</a> <var>userAgent</var>.
1433+
1434+
<li><p>Otherwise, set <var>userAgent</var> to <a>default `<code>User-Agent</code>` value</a>.
1435+
1436+
<li><p><a for="header list">Append</a> (`<code>User-Agent</code>`, <var>userAgent</var>) to
1437+
<var>httpRequest</var>'s <a for=request>header list</a>.
1438+
</ol>
1439+
</div>
1440+
14231441
<p>The <dfn>document `<code>Accept</code>` header value</dfn> is
14241442
`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`.
14251443

@@ -5988,17 +6006,12 @@ run these steps:
59886006

59896007
<li>
59906008
<p>If <var>httpRequest</var>'s <a for=request>header list</a> <a
5991-
for="header list">does not contain</a> `<code>User-Agent</code>`:
6009+
for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should run
6010+
the following steps:
59926011

59936012
<ol>
5994-
<li><p>Let <var>userAgent</var> be the result of running the
5995-
<a>WebDriver BiDi emulated User-Agent</a> with <var>httpRequest</var>'s
5996-
<a for=request>client</a>.
5997-
5998-
<li><p>If <var>userAgent</var> is not null, then set <var>userAgent</var> to
5999-
<a>isomorphic encoded</a> <var>userAgent</var>.
6000-
6001-
<li><p>Otherwise, set <var>userAgent</var> to <a>default `<code>User-Agent</code>` value</a>.
6013+
<li><p>Let <var>userAgent</var> be the <var>httpRequest</var>'s <a for=request>client</a>'s
6014+
<a>environment default `<code>User-Agent</code>` value</a>.
60026015

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

0 commit comments

Comments
 (0)