Skip to content

[WebDriver BiDi] emulate user-agent string #1851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5889,6 +5889,21 @@ 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:

<ol>
<li><p>Let <var>userAgent</var> be the result of running the [=WebDriver BiDi emulated
User-Agent=] with <var>httpRequest</var>'s <a for=request>client</a>.

<li><p>If <var>userAgent</var> is null, set <var>userAgent</var> to <a>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>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>`,
Expand Down