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
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?
Dmitry Katsubo opened SPR-16311 and commented
As to my interpretation of
ServletResponse#setLocale()
JavaDoc which reads:the corresponding implementation should set
HttpHeaders.CONTENT_LANGUAGE
which specifies the "language" of response content. Currently it setsHttpHeaders.ACCEPT_LANGUAGE
, which is "language that client understands / prefers" - that one should be set by the client when it makes a request.See also:
org.mortbay.jetty.Response#setLocale()
io.undertow.servlet.spec.HttpServletResponseImpl#setLocale()
Affects: 5.0.1
Issue Links:
Referenced from: commits 6df1a78
The text was updated successfully, but these errors were encountered: