[webkit-dev] Fixing Accept-Language

Alexey Proskuryakov ap-carbon at rambler.ru
Mon Jun 27 22:03:49 PDT 2005


Hi all,

   I've started working on a fix to what WebKit sends in Accept-Language HTTP 
header, and immediately noticed that it doesn't send anything, relying on an 
NSURLConnection default. This is strange, because WebKit needs to know what is 
being sent in this header for proper caching (apparently, that's broken now, 
though I haven't performed real-life tests, and may have overlooked 
something).

   I see several approaches to the problem, and would like to discuss their 
strong and weak sides before moving on with coding.

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.

3. Generate the Accept-Language header in a cross-platform manner. Downsides: 
looks like a rather serious rework of code, which I do not feel qualified to 
attempt yet; there's no automatic way to generate the whole list of preferred 
languages on other platforms.

   If it is believed to be an adequate solution, I could do #2.

- WBR, Alexey Proskuryakov



More information about the webkit-dev mailing list