Skip to content

MockHttpServletResponse.setLocale(Locale) should set HttpHeaders.CONTENT_LANGUAGE header [SPR-16311] #20858

Closed
@spring-projects-issues

Description

@spring-projects-issues

Dmitry Katsubo opened SPR-16311 and commented

As to my interpretation of ServletResponse#setLocale() JavaDoc which reads:

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.

See also:


Affects: 5.0.1

Issue Links:

Referenced from: commits 6df1a78

Metadata

Metadata

Assignees

Labels

in: testIssues in the test moduletype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions