Patch KProtocolManager::defaultUserAgent...

David Faure faure at kde.org
Wed Aug 19 10:28:01 BST 2009


On Monday 17 August 2009, Dawit A. wrote:
> Attached patch changes the language sent as part of the defaultUserAgent
> string to only the current default language. There is no need to send a
> list like we do in HTTP's Accept-Language header.

Can you elaborate? Why the change, what does it fix?

RFC 2616 section 14.4 does show that passing a list of languages
in Accept-Language is perfectly acceptable. What seems to be missing
is the use of quality values like "en;q=0.7" to make sure the user preferences
are evaluated in the right order (*). But certainly replacing the list of 
languages with a single language seems wrong, for those users who have set up 
a list of preferred languages with fallbacks.

(*) from the RFC:
"If no Accept-Language header is present in the request, the server SHOULD 
assume that all languages are equally acceptable."
That's not what we want, we want that the first language has priority over the
second, etc. So IMHO the fix is to add q=0.9 to the 2nd language, q=0.8 to
the 3rd one, etc.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list