Skip to content

Commit 4076b59

Browse files
default-user-agent-value accepts environment settings object
1 parent 2b201e0 commit 4076b59

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

fetch.bs

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,17 +1412,9 @@ downloads. This format of range header value can be set using <a>add a range hea
14121412

14131413
<hr>
14141414

1415-
<p>A <dfn id=default-user-agent-value export>default `<code>User-Agent</code>` value</dfn> is an
1416-
<a>implementation-defined</a> <a for=/>header value</a> for the `<code>User-Agent</code>`
1417-
<a for=/>header</a>.
1418-
1419-
<p class=note>For unfortunate web compatibility reasons, web browsers are strongly encouraged to
1420-
have this value start with `<code>Mozilla/5.0 (</code>` and be generally modeled after other web
1421-
browsers.
1422-
14231415
<div algorithm>
14241416
<p>To get the <a>environment settings object</a> <var>environment</var>'s
1425-
<dfn export id=environment-default-user-agent-value>environment default `<code>User-Agent</code>` value</dfn>:
1417+
<dfn export id=default-user-agent-value>default `<code>User-Agent</code>` value</dfn>:
14261418

14271419
<ol>
14281420
<li><p>Let <var>userAgent</var> be the <a>WebDriver BiDi emulated User-Agent</a> for
@@ -1431,7 +1423,10 @@ browsers.
14311423
<li><p>If <var>userAgent</var> is not null, then return <a>isomorphic encoded</a>
14321424
<var>userAgent</var>.
14331425

1434-
<li><p>Return <a>default `<code>User-Agent</code>` value</a>.
1426+
<li><p>Return an <a>implementation-defined</a> <a for=/>header value</a> for the
1427+
`<code>User-Agent</code>` <a for=/>header</a>. For unfortunate web compatibility reasons, web
1428+
browsers are strongly encouraged to have this value start with `<code>Mozilla/5.0 (</code>` and be
1429+
generally modeled after other web browsers.
14351430
</ol>
14361431
</div>
14371432

@@ -6001,18 +5996,12 @@ run these steps:
60015996
the <a data-lt="structured field token">token</a> <code>prefetch</code>) in
60025997
<var>httpRequest</var>'s <a for=request>header list</a>.
60035998

6004-
<li>
6005-
<p>If <var>httpRequest</var>'s <a for=request>header list</a> <a
6006-
for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should run
6007-
the following steps:
6008-
6009-
<ol>
6010-
<li><p>Let <var>userAgent</var> be the <var>httpRequest</var>'s <a for=request>client</a>'s
6011-
<a>environment default `<code>User-Agent</code>` value</a>.
6012-
6013-
<li><p><a for="header list">Append</a> (`<code>User-Agent</code>`, <var>userAgent</var>) to
6014-
<var>httpRequest</var>'s <a for=request>header list</a>.
6015-
</ol>
5999+
<li><p>If <var>httpRequest</var>'s <a for=request>header list</a>
6000+
<a for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should
6001+
<a for="header list">append</a> (`<code>User-Agent</code>`,
6002+
<var>httpRequest</var>'s <a for=request>client</a>'s
6003+
<a>default `<code>User-Agent</code>` value</a>) to <var>httpRequest</var>'s
6004+
<a for=request>header list</a>.
60166005

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

0 commit comments

Comments
 (0)