Chris DaMour opened SPR-14802 and commented
When Spring MVC works with a controller result that ends up with rendering a view, the Dispatch servlet sets the locale on the response, which in turn sets the contentLanguage and thus the response Content-Language header. at this line
|
Locale locale = this.localeResolver.resolveLocale(request); |
The same thing does not happen when returning something that is handled by a MessageConverter as there is now mv by the time it gets to
|
if (mv != null && !mv.wasCleared()) { |
but even then the response has been flushed so it wouldn't work anyways.
Seems like this should be set somewhere during the processing of the http message converter.
Affects: 4.2.7
Issue Links:
Chris DaMour opened SPR-14802 and commented
When Spring MVC works with a controller result that ends up with rendering a view, the Dispatch servlet sets the locale on the response, which in turn sets the contentLanguage and thus the response Content-Language header. at this line
spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
Line 1228 in 69116c2
The same thing does not happen when returning something that is handled by a MessageConverter as there is now mv by the time it gets to
spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
Line 1036 in 69116c2
Seems like this should be set somewhere during the processing of the http message converter.
Affects: 4.2.7
Issue Links: