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
MockHttpServletResponse.setLocale(Locale) should set HttpHeaders.CONTENT_LANGUAGE header [SPR-16311] #20858
In the case of HTTP, the locale is communicated via the Content-Language header, the character encoding as part of the Content-Type header for text media types.
the corresponding implementation should set HttpHeaders.CONTENT_LANGUAGE which specifies the "language" of response content. Currently it sets HttpHeaders.ACCEPT_LANGUAGE, which is "language that client understands / prefers" - that one should be set by the client when it makes a request.
Rossen Stoyanchev, this looks like a bug to me: The intent behind #19773 was to set common language headers behind the Servlet API request/response state methods, and in this case we seem to accidentally set the request-related header on the response?
Activity
spring-projects-issues commentedon Dec 19, 2017
Juergen Hoeller commented
Rossen Stoyanchev, this looks like a bug to me: The intent behind #19773 was to set common language headers behind the Servlet API request/response state methods, and in this case we seem to accidentally set the request-related header on the response?
spring-projects-issues commentedon Dec 19, 2017
Rossen Stoyanchev commented
Indeed it's clearly a bug since ACCEPT_LANGUAGE is a request header.