diff --git a/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java b/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java index 3c5459e615..5dd0dbd424 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java +++ b/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java @@ -111,9 +111,9 @@ public class ServletServerHttpRequest implements ServerHttpRequest { this.servletRequest.getCharacterEncoding() != null) { MediaType oldContentType = this.headers.getContentType(); Charset charSet = Charset.forName(this.servletRequest.getCharacterEncoding()); - Map params = new HashMap(oldContentType.getParameters()); - params.put("charset", charSet.toString()); - MediaType newContentType = new MediaType(oldContentType.getType(), oldContentType.getSubtype(), params); + Map params = new HashMap(oldContentType.getParameters()); + params.put("charset", charSet.toString()); + MediaType newContentType = new MediaType(oldContentType.getType(), oldContentType.getSubtype(), params); this.headers.setContentType(newContentType); } if (this.headers.getContentLength() == -1 && this.servletRequest.getContentLength() != -1) {