-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Rob Winch opened SPR-11701 and commented
Overview
Currently the MockHttpServletRequest defaults to Locale.ENGLISH. However, the ServletRequest javadoc states:
If the client request doesn't provide an Accept-Language header, this method returns the default locale for the server.
We should probably also have some sort of way to ensure that if the Accept-Language header is specified that it is synched with the Locale (similar to Content-Type).
Deliverables
- Update class-level Javadoc for
MockHttpServletRequestwith information regarding the default locale for the mocked server. - (?) Ensure that
MockHttpServletRequest.getLocale()complies with the Javadoc from the Servlet specification with regard to theAccept-Languageheader. - (?) Ensure that
MockHttpServletRequest.getLocales()complies with the Javadoc from the Servlet specification with regard to theAccept-Languageheader.
Affects: 4.0.3
Reference URL: https://github.com/spring-projects/spring-test-mvc-htmlunit/issues/21
Issue Links:
- Document that MockHttpServletRequest does not comply with Servlet spec regarding Accept-Language header [SPR-12043] #16659 Document that MockHttpServletRequest does not comply with Servlet spec regarding Accept-Language header
Referenced from: commits 9bf73f3
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement