net: Use the user locale for the Accept-Language header and navigator language (#41919)

That respects the user locale better than hardcoding en-US. This can
also be manually set with the `LANG` environment variable.

Testing: Manual testing with the devtools to check the header sent and
the value of `navigator.language`

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef
2026-02-23 05:05:21 -08:00
committed by GitHub
parent c6a5eb584a
commit a4c5ca1070
8 changed files with 44 additions and 18 deletions

View File

@@ -176,6 +176,7 @@ jobs:
if: ${{ inputs.unit-tests }}
env:
NEXTEST_RETRIES: 2 # https://github.com/servo/servo/issues/30683
LANG: en-US
run: ./mach test-unit --profile ${{ inputs.profile }} --nextest-profile ci
# We upload the test-results to Codecov to help us identify flaky unit-tests.
- name: Upload test results to Codecov
@@ -356,6 +357,7 @@ jobs:
shell: bash
env:
NEXTEST_RETRIES: 2 # https://github.com/servo/servo/issues/30683
LANG: en-US
run: |
./mach test-unit --code-coverage \
--profile=${{ steps.options.outputs.cargo_profile }} \