forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce setDefaultCharacterEncoding() in MockHttpServletResponse
Prior to this commit, it was possible to set the character encoding in MockHttpServletResponse via setCharacterEncoding() or setContentType(); however, those methods append "charset=..." to the Content-Type header which may not be an acceptable side effect. This commit addresses this shortcoming by introducing a new setDefaultCharacterEncoding() in MockHttpServletResponse which allows one to override the previously hard coded value of "ISO-8859-1". In addition, setDefaultCharacterEncoding() does not modify the Content-Type header. The reset() method has also been updated to reset the character encoding to the configured default character encoding. Closes spring-projectsgh-27214
- Loading branch information
Showing
3 changed files
with
90 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters