Use request contentType/encoding in ServletServetHttpRequest/Response

ServletServerHttpRequest now falls back on the contentType and the
the characterEncoding of the ServletRequest, if the headers of the
incoming request don't specify one. Similary ServletServerHttpResponse
sets the contentType and the characterEncoding of the ServletResponse
if not already set.

This allows using the CharacterEncodingFilter to set a character
encoding where the request doesn't specify one and have it be used
in HttpMessageConverter's.

SPR-9096
This commit is contained in:
Arjen Poutsma
2012-02-09 11:20:24 +01:00
committed by Rossen Stoyanchev
parent ff44c9132c
commit edc80ffa95
6 changed files with 62 additions and 11 deletions

View File

@@ -42,6 +42,7 @@ Changes in version 3.1.1 (2012-02-13)
* fixed request mapping bug involving direct vs pattern path matches with HTTP methods
* removed check for HTTP "POST" when resolving multipart request controller method arguments
* updated @RequestMapping and reference docs wrt differences between @MVC 3.1 and @MVC 2.5-3.0
* ServletServerHttpRequest/Response fall back on the Content-Type and encoding of the request
Changes in version 3.1 GA (2011-12-12)