Closed Bug 1847701 Opened 2 years ago Closed 11 months ago

accept-language format should be language-region like Chrome/Android

Categories

(GeckoView :: General, defect, P2)

All
Android
defect

Tracking

(relnote-firefox 125+, firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
relnote-firefox --- 125+
firefox125 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file)

Chrome's accept-language header is language-region format of BCP47. But GeckoView is language-script-region on Android 13.

We should be same format.

Priority: -- → P2

The severity field is not set for this bug.
:boek, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)
Severity: -- → S3
Flags: needinfo?(jboek)

I'm not entirely sure yet, but I wonder if this could impact Translations on Android too?

It looks like translations may use the Accept-Language for getting the recommended "translate to" language: TranslationsParent.getWebContentLanguages()

(Only took a quick look to see if it could be relevant, this may need additional investigation. I'll link it to the Android translations meta to look at further.)

See Also: → 1873578
Duplicate of this bug: 1873578

As spec (RFC 7231), accept-language can accept language tag (BCP 47).

Currently, Firefox Android uses Locale.toLanguageTag API. But it may
append variant and extensions etc.

But Chrome/Android and desktop browser use <language>-<region> format for
this header, so we should use same format for compatibility.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/0f63ab562496 Accept-language format should be language-region format like Dekstop and Chrome/Android. r=geckoview-reviewers,necko-reviewers,platform-i18n-reviewers,valentin
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
See Also: → 1884694

Is this something we should call out in the Fx125 relnotes? Please nominate by setting the relnote-firefox flag to ? if yes.

Flags: needinfo?(m_kato)

Release Note Request (optional, but appreciated)
[Why is this notable]:
Accept-Language format of HTTP request is changed on Firefox 125 for Android. Until 124, Firefox may add variant, extension and etc such en-US-u-fw-mon-mu-celsius.

[Suggested wording]:
Accept-Language header of HTTP request doesn't include variant and extension of BCP47. Until Firefox 124, it may had variant, extension etc such en-US-u-fw-mon-mu-celsius.

relnote-firefox: --- → ?
Flags: needinfo?(m_kato)

Added to the Fx125 relnotes with the language below. Let me know if the wording needs any adjusting.

Firefox for Android no longer includes the variant and extension of BCP47 in the Accept-Language header of HTTP requests for better interoperability with other browsers.

Regressions: 1887019
Regressions: 1892363
Duplicate of this bug: 1818886
Component: Core → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: