New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706088 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Invalid Accept-Language header format (multiple quality values)

Reported by iev...@coxds.com, Mar 28 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
We develop RTB platform and noticed lots of ad requests with invalid Accept-Language header.

Example:
en-US,en;q=0.5;q=0.8

All of such the requests has user agent like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36

with variations of Chrome version and OS version.

What is the expected behavior?
Languages in the header should be comma-separated values with one or zero quality values ("q = ...").

What went wrong?
In the example there are 2 quality values for "en" language, which seems to be invalid Accept-Language header.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 56.0.2924.87  Channel: n/a
OS Version: 6.3
Flash Version: Shockwave Flash 25.0 r0
 
Components: Internals>Network

Comment 2 by mmenke@chromium.org, Mar 28 2017

Cc: js...@chromium.org
Components: UI>Internationalization
Hrm...I suspect something is calling GenerateAcceptLanguageHeader (which adds the q values, but doesn't expect them on its input) with "en-US,en;q=0.5".  Where in the world that string actually comes from is a far more interesting question.

[+jshin]:  Looks like you own https://cs.chromium.org/chromium/src/ui/base/l10n/, which is where the default value for this comes from, I think?  https://cs.chromium.org/chromium/src/chrome/browser/ui/prefs/prefs_tab_helper.cc?q=kAcceptLanguages+-file:test%5C.&dr=C&l=548

Of course, unclear if this is the default value or being set elsewhere - I couldn't find any q=0.5's in the codebase, but that doesn't mean anything.  Testing locally with the same version (56.0.2924.87), I look to be sending the correct "en-US,en;q=0.8" header.
Labels: Needs-Milestone
Components: -Internals>Network
Seems like something is causing the preference string to have the wrong value? Did a previous Chrome version store the quality indicator in the preference string? This might mean those need to be cleaned up somehow.

Labels: TE-NeedsTriageHelp

Comment 6 by dk...@chromium.org, Apr 5 2017

Components: Blink>Network
Status: Untriaged (was: Unconfirmed)
Adding Blink>Network (as opposed to internals) since this is web exposed. Can someone on the network team help route this?
Cc: yhirano@chromium.org
Components: -Blink>Network
I don't think we can do anything here.
Cc: napper@chromium.org claudiomagni@chromium.org
Components: UI>Browser>Language

Comment 9 by napper@chromium.org, Jul 26 2017

Owner: claudiomagni@chromium.org
Status: Assigned (was: Untriaged)
Cc: yyushkina@chromium.org
Labels: -Pri-2 Pri-3
I can't reproduce the issue.
The function that generates the AcceptLanguage HTTP header is called in two places: user preferences and options in headless Chrome.

In the first case, a malformed string would occur only if the user preferences have been corrupted in the past and they never changed them.

In the second case, it depends on whatever device is embedding Chrome and that is outside of what we can control.


For the first case, we could implement a sanitizer that cleans malformed user preferences, but I don't think it's worth it to deploy this and run it for all Chrome users.
I would close this bug as "cannot reproduce".

@Yana: what do you think?
Agreed. Close as can't reproduce.
Status: WontFix (was: Assigned)

Sign in to add a comment