From 61a4217709b03471a851b70614000711bb854dfc Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Wed, 22 Oct 2025 09:32:17 +0200 Subject: [PATCH 1/5] Override "Accept-Language" header if WebDriver BiDi emulated language is present. --- fetch.bs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/fetch.bs b/fetch.bs index 8d19ae84d..b05b85be7 100755 --- a/fetch.bs +++ b/fetch.bs @@ -4659,10 +4659,28 @@ the response. [[!HTTP-CACHING]] request's header list. -
  • If request's header list - does not contain `Accept-Language`, then user agents should - append (`Accept-Language, an appropriate - header value) to request's header list. +

  • +

    If request's header list does not contain `Accept-Language`: + +

      +
    1. +

      If request's client is non-null, then: + +

        +
      1. Let emulatedLanguage be the WebDriver BiDi emulated language + for request's client + +

      2. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) + to request's header list. + +

      3. Otherwise, user agents should append (`Accept-Language, an appropriate + header value) to request's header list. +

      + +
    2. Otherwise, user agents should append (`Accept-Language, an appropriate + header value) to request's header list. +

    +
  • If request's internal priority is null, then use From 7d6010833183a4967a43394288dd0a05e5d055f7 Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Thu, 23 Oct 2025 14:49:51 +0200 Subject: [PATCH 2/5] Update fetch.bs Co-authored-by: Anne van Kesteren --- fetch.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index b05b85be7..44d59e3b3 100755 --- a/fetch.bs +++ b/fetch.bs @@ -4668,7 +4668,7 @@ the response. [[!HTTP-CACHING]]

    1. Let emulatedLanguage be the WebDriver BiDi emulated language - for request's client + for request's client.

    2. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) to request's header list. From 268b10f5a42421e52980faa8faa657181e2a8247 Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Thu, 23 Oct 2025 14:50:00 +0200 Subject: [PATCH 3/5] Update fetch.bs Co-authored-by: Anne van Kesteren --- fetch.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index 44d59e3b3..45487b5ef 100755 --- a/fetch.bs +++ b/fetch.bs @@ -4664,7 +4664,7 @@ the response. [[!HTTP-CACHING]]

      1. -

        If request's client is non-null, then: +

        If request's client is non-null:

        1. Let emulatedLanguage be the WebDriver BiDi emulated language From b53ec8c9f179008c9d5f87fefc3f314cee8b51fb Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Thu, 23 Oct 2025 14:58:05 +0200 Subject: [PATCH 4/5] Fix indentation. --- fetch.bs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fetch.bs b/fetch.bs index 45487b5ef..80d7688d4 100755 --- a/fetch.bs +++ b/fetch.bs @@ -4663,22 +4663,22 @@ the response. [[!HTTP-CACHING]]

          If request's header list does not contain `Accept-Language`:

            -
          1. -

            If request's client is non-null: +

          2. +

            If request's client is non-null: -

              -
            1. Let emulatedLanguage be the WebDriver BiDi emulated language - for request's client. +

                +
              1. Let emulatedLanguage be the WebDriver BiDi emulated language + for request's client. -

              2. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) - to request's header list. +

              3. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) + to request's header list. -

              4. Otherwise, user agents should append (`Accept-Language, an appropriate - header value) to request's header list. -

              +
            2. Otherwise, user agents should append (`Accept-Language, an appropriate + header value) to request's header list. +

            -
          3. Otherwise, user agents should append (`Accept-Language, an appropriate - header value) to request's header list. +

          4. Otherwise, user agents should append (`Accept-Language, an appropriate + header value) to request's header list.

          From 15e5eb4bed4a265a5fc1719668f81534a90d63e1 Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Thu, 23 Oct 2025 15:16:24 +0200 Subject: [PATCH 5/5] Merge some conditions. --- fetch.bs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/fetch.bs b/fetch.bs index 80d7688d4..b87736ae6 100755 --- a/fetch.bs +++ b/fetch.bs @@ -4660,27 +4660,21 @@ the response. [[!HTTP-CACHING]]
      2. -

        If request's header list does not contain `Accept-Language`: +

        If request's header list does not contain `Accept-Language` and + request's client is non-null:

          -
        1. -

          If request's client is non-null: - -

            -
          1. Let emulatedLanguage be the WebDriver BiDi emulated language - for request's client. - -

          2. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) - to request's header list. - -

          3. Otherwise, user agents should append (`Accept-Language, an appropriate - header value) to request's header list. -

          +
        2. Let emulatedLanguage be the WebDriver BiDi emulated language + for request's client. -

        3. Otherwise, user agents should append (`Accept-Language, an appropriate - header value) to request's header list. +

        4. If emulatedLanguage is not null, append(`Accept-Language, emulatedLanguage) + to request's header list.

        +
      3. If request's header list + does not contain `Accept-Language`, then user agents should + append (`Accept-Language, an appropriate + header value) to request's header list.

      4. If request's internal priority is null, then use