Skip to content

Commit 70908ed

Browse files
WebDriver BiDi: emulate default User-Agent value
1 parent e28f9a5 commit 70908ed

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

fetch.bs

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,21 @@ 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 <a>environment settings object</a> <var>environment</var>'s
1425+
<dfn export>environment default `<code>User-Agent</code>` value</dfn>:
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 non-null, then return <var>userAgent</var>,
1432+
<a>isomorphic encoded</a>.
1433+
1434+
<li><p>Return the <a>default `<code>User-Agent</code>` value</a>.
1435+
</ol>
1436+
</div>
1437+
14231438
<p>The <dfn>document `<code>Accept</code>` header value</dfn> is
14241439
`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`.
14251440

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

5989-
<li><p>If <var>httpRequest</var>'s <a for=request>header list</a>
5990-
<a for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should
5991-
<a for="header list">append</a> (`<code>User-Agent</code>`,
5992-
<a>default `<code>User-Agent</code>` value</a>) to <var>httpRequest</var>'s
5993-
<a for=request>header list</a>.
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:
6007+
6008+
<ol>
6009+
<li><p>Let <var>userAgent</var> be <var>httpRequest</var>'s <a for=request>client</a>'s
6010+
<a>environment default `<code>User-Agent</code>` value</a>.
6011+
6012+
<li><p><a for="header list">Append</a> (`<code>User-Agent</code>`, <var>userAgent</var>) to
6013+
<var>httpRequest</var>'s <a for=request>header list</a>.
6014+
</ol>
59946015

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

0 commit comments

Comments
 (0)