You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AcceptHeaderLocaleResolver chooses wrong Locale for language match [SPR-16599] #21140
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
I've refined the algorithm slightly differently: We still check for full language+country match in the supported locales even for later Accept-Language entries... but only if their language part matches, i.e. only if they narrow the primary language to a specific country. This is necessary for backwards compatibility in always finding the most specific match possible: e.g. en-UK in case of en-US,en-UK in the accept header and Locale.ENGLISH, Locale UK as the supported locales.
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
Activity
spring-projects-issues commentedon Mar 16, 2018
Juergen Hoeller commented
I've refined the algorithm slightly differently: We still check for full language+country match in the supported locales even for later Accept-Language entries... but only if their language part matches, i.e. only if they narrow the primary language to a specific country. This is necessary for backwards compatibility in always finding the most specific match possible: e.g.
en-UKin case ofen-US,en-UKin the accept header andLocale.ENGLISH, Locale UKas the supported locales.spring-projects-issues commentedon Mar 19, 2018
Naozumi Taromaru commented
Thanks!