Bug 1329855 - Wrong Accept-Language header being sent
Summary: Wrong Accept-Language header being sent
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 23
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1328866 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-23 22:24 UTC by Cesar Eduardo Barros
Modified: 2016-12-20 20:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 20:07:09 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1005640 0 -- RESOLVED Wrong Accept-Language if using a language pack that changes the default value of the intl.accept_language pref 2020-03-24 07:51:49 UTC

Description Cesar Eduardo Barros 2016-04-23 22:24:15 UTC
Description of problem:

Recently, I noticed that some websites were loading by default in their English version, while before, they correctly loaded the Portuguese version by default.

Looking into it, I found that the Accept-Language header is being sent as "en-US,en;q=0.5", while the correct header would also have the pt-BR and pt language codes. The problem still happens when started with the -safe-mode parameter.

The symptoms I have are identical to these described at https://bugzilla.mozilla.org/show_bug.cgi?id=1005640: the intl.accept_languages preference is defaulted. If I edit it and then reset to default, it sends the correct header until I close the browser. That bug report suggests the problem is distro-specific, which is why I'm reporting here instead of upstream.

Version-Release number of selected component (if applicable):

firefox-45.0.2-1.fc23.x86_64

How reproducible:

Every time.

Steps to Reproduce:
1. Set LANG=pt_BR.UTF-8 in the environment (clearing any LC_* variables)
2. Start Firefox
3. Open any site which shows the HTTP headers, for instance https://pgl.yoyo.org/http/browser-headers.php, or use the network view in Firefox's web developer tools.

Actual results:

The Accept-Language header shows only en-US and en, in that order, even though about:config shows the default value for "intl.accept_languages" as "pt-BR, pt, en-US, en".

Expected results:

The Accept-Language header should show the four languages pt-BR, pt, en-US, en, in that order, which is the value shown for "intl.accept_languages" in about:config

Additional info:

I only noticed this recently, because most sites I visit often don't use automatic language detection, so I don't know when the problem started happening.

Comment 1 Jan Horak 2016-05-24 07:40:44 UTC
With firefox-46.0.1-4.fc24.x86_64 I'm no longer able to reproduce. Could you please try the latest f23 version (firefox-46.0.1-4.fc23).

Comment 2 Cesar Eduardo Barros 2016-05-24 10:54:53 UTC
With firefox-46.0.1-4.fc23.x86_64, I still see the problem (Accept-Language is "en-US,en;q=0.5", while intl.accept_languages is defaulted to "pt-BR, pt, en-US, en"). I've noticed, however, that the first time you open Firefox after an upgrade the problem doesn't show; you have to close it and open it again for the issue to happen.

Comment 3 Jan Horak 2016-08-23 14:31:21 UTC
Do you have any addons installed? Please try to run firefox in safe mode (firefox -safe-mode) whenever the problem also shows up.

Comment 4 Piotr Drąg 2016-08-23 14:58:47 UTC
Safe mode disables langpacks, so it's expected that it always sends en-US,en;q=0.5.

I'm using firefox-48.0-5.fc24.x86_64 now, but nothing has changed in the last several releases. It's always en-US,en;q=0.5 when it should be pl,en-US,en;q=0.5 (as set in language preferences by the langpack).

My system is LANG=pl_PL.UTF-8.

Comment 5 Cesar Eduardo Barros 2016-08-23 16:56:54 UTC
(In reply to Jan Horak from comment #3)
> Do you have any addons installed? Please try to run firefox in safe mode
> (firefox -safe-mode) whenever the problem also shows up.

This was found to be an upstream bug at https://bugzilla.mozilla.org/show_bug.cgi?id=1005640#c15 and the following comment. From what I understand, if a certain component within Firefox initializes before the langpack, this issue happens. The issue does not happen in localized builds which do not use langpacks, or if the langpack wins the race and initializes first.

Comment 6 Jan Horak 2016-08-31 12:44:20 UTC
*** Bug 1328866 has been marked as a duplicate of this bug. ***

Comment 7 Fedora End Of Life 2016-11-25 07:27:25 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2016-12-20 20:07:09 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.