Bug 5152 - Accept-Language header incorrect locales, only 1 language
Summary: Accept-Language header incorrect locales, only 1 language
Status: RESOLVED DUPLICATE of bug 3510
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Chris Blumenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-27 09:16 PDT by Dan Wood
Modified: 2005-09-27 13:40 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Wood 2005-09-27 09:16:03 PDT
Summary: The Accept-Language header that webkit sends is not properly dealing with locales (e.g. 
brazilian portuguese), and it only sends one language, even if you have defined multiple ordered 
languages in your system preferences.

To reproduce
* Open up System Preferences -> International -> Language
* Load <http://www.gmdc.org/publicapp/snoop.serv?testParm1=testVal1&testParm2=testVal2> (or 
any other web page showing you the HTTP headers

Now move the following langauges to the top of the list in System Prefs, and reload the page, noticing 
the value of the Accept-language parameter.

For instance  (view in a monspaced font):

Topmost Locale        Expected     Actual
--------------        --------     ------
British English         en-gb       en
Australian English      en-au       en-us
Canadian English (eh?)  en-ca       en-us
Portuguese              pt          pt-pt
Brazilian Portuguese    pt-br       pt-pt
German                  de          de-de
Swiss German            de-ch       de-de
Canadian French         fr-ca       fr-fr
Swiss French            fr-ch       fr-fr


The other issue is that according to <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>, you 
can specify multiple languages that your browser accepts; it seems that WebKit should take more than 
just the topmost language in AppleLanguages into account.
Comment 1 Alexey Proskuryakov 2005-09-27 13:40:00 PDT

*** This bug has been marked as a duplicate of 3510 ***