[Nuxeo-tickets] [Nuxeo Repository] #1878: Accept-Language headers are not honored as they should if no quality is specified

Nuxeo Repository trac at nuxeo.com
Thu Jan 3 18:32:26 CET 2008


#1878: Accept-Language headers are not honored as they should if no quality is
specified
-----------------------+----------------------------------------------------
 Reporter:  madarche   |       Owner:  madarche 
     Type:  defect     |      Status:  new      
 Priority:  P3         |   Milestone:  CPS 3.4.6
Component:  Localizer  |     Version:  TRUNK    
 Severity:  minor      |    Keywords:           
-----------------------+----------------------------------------------------
 When there is no specified quality for languages in Accept-Language
 headers, the order matters.

 It is needed to keep the order of the passed keys as recommended by
 RFC3282 :

 If no Q values are given, the language-ranges are given in priority order,
 with the leftmost language-range being the most preferred language; this
 is an extension to the HTTP/1.1 rules, but matches current practice.

 The following example returns "Recherche avancée" which is fine :
 {{{
 $  wget -o /dev/null -O - --header='Accept-Language: fr'
 http://localhost:8080/cps | fgrep 'advanced_search_form">'
 }}}

 But with "Accept-Language: fr,en" returns "Advanced search" while it
 should return the French translation : "Recherche avancée".

 The example with "Recherche avancée" is just an example, it fails with all
 translations.

-- 
Ticket URL: <https://svn.nuxeo.org/trac/pub/ticket/1878>
Nuxeo Repository <http://www.cps-project.org/>
Nuxeo Repository



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.