Skip to content

Commit d26dcca

Browse files
sadym-chromiumpmeenan
authored andcommitted
WebDriver BiDi: emulate default User-Agent value
1 parent 87e2577 commit d26dcca

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
@@ -1423,6 +1423,21 @@ downloads. This format of range header value can be set using <a>add a range hea
14231423
have this value start with `<code>Mozilla/5.0 (</code>` and be generally modeled after other web
14241424
browsers.
14251425

1426+
<div algorithm>
1427+
<p>To get the <a>environment settings object</a> <var>environment</var>'s
1428+
<dfn export>environment default `<code>User-Agent</code>` value</dfn>:
1429+
1430+
<ol>
1431+
<li><p>Let <var>userAgent</var> be the <a>WebDriver BiDi emulated User-Agent</a> for
1432+
<var>environment</var>.
1433+
1434+
<li><p>If <var>userAgent</var> is non-null, then return <var>userAgent</var>,
1435+
<a>isomorphic encoded</a>.
1436+
1437+
<li><p>Return the <a>default `<code>User-Agent</code>` value</a>.
1438+
</ol>
1439+
</div>
1440+
14261441
<p>The <dfn>document `<code>Accept</code>` header value</dfn> is
14271442
`<code>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code>`.
14281443

@@ -6012,11 +6027,17 @@ run these steps:
60126027
the <a data-lt="structured field token">token</a> <code>prefetch</code>) in
60136028
<var>httpRequest</var>'s <a for=request>header list</a>.
60146029

6015-
<li><p>If <var>httpRequest</var>'s <a for=request>header list</a>
6016-
<a for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should
6017-
<a for="header list">append</a> (`<code>User-Agent</code>`,
6018-
<a>default `<code>User-Agent</code>` value</a>) to <var>httpRequest</var>'s
6019-
<a for=request>header list</a>.
6030+
<li>
6031+
<p>If <var>httpRequest</var>'s <a for=request>header list</a> <a
6032+
for="header list">does not contain</a> `<code>User-Agent</code>`, then user agents should:
6033+
6034+
<ol>
6035+
<li><p>Let <var>userAgent</var> be <var>httpRequest</var>'s <a for=request>client</a>'s
6036+
<a>environment default `<code>User-Agent</code>` value</a>.
6037+
6038+
<li><p><a for="header list">Append</a> (`<code>User-Agent</code>`, <var>userAgent</var>) to
6039+
<var>httpRequest</var>'s <a for=request>header list</a>.
6040+
</ol>
60206041

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

0 commit comments

Comments
 (0)