[webkit-dev] Fixing Accept-Language
darin at apple.com
Tue Jun 28 10:24:15 PDT 2005
On Jun 27, 2005, at 10:03 PM, Alexey Proskuryakov wrote:
> 1. Do nothing, wait for a fix in NSURLConnection. Downsides: may
> take a lot of time; not clear what to do with caching.
> 2. Add a proper Accept-Language header when creating an
> NSURLRequest, thus overriding the default. Downsides: duplicates
> work that should be eventually done in NSURLConnection, yet not in
> a cross-platform way.
What is a "proper" Accept-Language header? Older versions of
NSURLConnection used to send the complete list of languages specified
in the System Preferences. This created major compatibility headaches
with many websites, including sites assuming the user was coming from
Germany just because German was one of the listed languages, and web
servers that choked on anything but the simplest . We ended up
dumbing down this header to match more closely what other browsers
send to resolve the compatibility problems.
If something's broken about this header, I suggest fixing it in
NSURLConnection; if there's a need for WebKit to get the header then
we can change NSURLConnection API so that you can query the header
value. Adding code in WebKit to work around the fact that a newer
NSURLConnection is not available yet sounds OK too.
More information about the webkit-dev