Closed Bug 582075 Opened 14 years ago Closed 13 years ago

accept-lang for nb-NO fx4 does not forward to correct localized site

Categories

(Input :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mail, Assigned: davedash)

References

Details

When using Fx builds with nb-NO locale, the URL http://input.stage.mozilla.com/ incorrectly forwards to the ./en-US/ directory.
Expected result: User should be forwarded to http://input.stage.mozilla.com/nb-NO/

The accept-lang string for nb-NO fx4 is: "nb,no;q=0.8,nn;q=0.6,en-us;q=0.4,en;q=0.2"
The corresponding intl.accept_languages pref is: "nb, no, nn, en-us, en"

Please forward users with accept-lang "nb" to the "nb-NO" localization.

(In the future, the nb-NO fx builds MAY add the "nb-no" locale code to the accept-lang header)
jbalogh: Have we fixed this problem on AMO/Zamboni? I remember we had the problem of forwarding en -> en-US etc. there before.
AFAIK we only go from more-specific to less-specific, not the other way around.
I think so too.
Severity: normal → enhancement
Actually, we do match both ways, but not properly.

I read 14.4 of the HTTP 1.1 standard [1] again and we should fix this to follow the standard more closely.

Current behavior:
- in the order of quality-factor look if one of our languages matches.
- if we have an exact match anywhere (in this case: en-us), serve it.
- if not, again in the order of QF, do a prefix-match.

Expected behavior:
- in the order of quality factor:
-- match exactly
-- if it did not match, perform prefix match for this string

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
There I Fixed It:

http://github.com/fwenzel/reporter/commit/8f6a63c
Assignee: nobody → dd
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.1
Verified /nb-NO locale displays correctly, as does /fy-NL
Status: RESOLVED → VERIFIED
Component: Input → General
Product: Webtools → Input
You need to log in before you can comment on or make changes to this bug.