Skip to content

Content-Language not set for responses rendered with Message Converters [SPR-14802] #19368

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

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:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions