Closed
Bug 629116
Opened 15 years ago
Closed 15 years ago
Normalize dialects in accept-language to lowercase per convention
Categories
(Camino Graveyard :: Preferences, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alqahira, Assigned: alqahira)
Details
(Keywords: regression, Whiteboard: [camino-2.0.8])
Attachments
(1 file)
|
3.33 KB,
patch
|
stuart.morgan+bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
Although the RFC says accept-lang entries are supposed to be case-insensitive, convention appears to be that they should be all lowercase (Opera and Chrome do not; Firefox, Safari, OmniWeb do). Sam has found at least one website that breaks (sends you your third-favorite language) if you use "en-US" instead of "en-us" (skips "en-US" because of caps and skips "en" just because).
Once upon a time, before Apple switched the format of locales in AppleLanguages, we did this correctly (1.6.x on 10.3.9 gets it right); now we don't, and the fix for "servers skip 'en'" made it worse by hard-coding "en-US" as the override.
We should fix our code to adhere to convention and spare our users problems with more buggy sites.
Flags: camino2.0.7?
| Assignee | ||
Updated•15 years ago
|
Keywords: regression
| Assignee | ||
Comment 1•15 years ago
|
||
This makes sure an individual item is lowercased (for the 10.4+ hyphen-separated locale format) and also fixes the "if only 'en', add 'en-us'" override to be lowercased.
I checked on cb-x1 and it was using new-style "en-US" locales in AppleLanguages, which means all Intel Macs should have shipped using hyphens, and the underscore-to-hyphen conversion part of convertLocaleToHTTPLanguage: will only be needed as long as we support PPC Macs, which could have shipped with an OS that used underscores in AppleLanguages. I added a note to that method's comment to that effect.
Attachment #507362 -
Flags: superreview?(stuart.morgan+bugzilla)
Comment 2•15 years ago
|
||
Comment on attachment 507362 [details] [diff] [review]
Follow convention and lowercase languages
sr=smorgan.
Bets on how long until we hit a server that requires en-US instead of en-us? ;)
Attachment #507362 -
Flags: superreview?(stuart.morgan+bugzilla) → superreview+
| Assignee | ||
Comment 3•15 years ago
|
||
http://hg.mozilla.org/camino/rev/5f91bf57294a
(In reply to comment #2)
> Bets on how long until we hit a server that requires en-US instead of en-us? ;)
I'm guessing Google has at least one misconfigured server out there somewhere ;)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 4•15 years ago
|
||
CAMINO_2_0_BRANCH in advance of 2.0.7.
Flags: camino2.0.7? → camino2.0.7+
Whiteboard: [camino-2.0.7]
| Assignee | ||
Comment 5•15 years ago
|
||
2.0.7 ended up being an emergency release.
Whiteboard: [camino-2.0.7] → [camino-2.0.8]
You need to log in
before you can comment on or make changes to this bug.
Description
•