From dc59ca427c16c40f327a683253e704ecad2c4675 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 29 Jul 2009 08:37:59 +0000 Subject: [PATCH] Using correct encoding (ISO-8859-1) instead of JVM default when no character encoding is given. --- .../springframework/web/filter/ShallowEtagHeaderFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.springframework.web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java b/org.springframework.web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java index 3888435784e..34840d88f98 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java +++ b/org.springframework.web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponseWrapper; import org.springframework.util.FileCopyUtils; import org.springframework.util.Md5HashUtils; +import org.springframework.web.util.WebUtils; /** * {@link javax.servlet.Filter} that generates an ETag value based on the content on the response. This @@ -118,7 +119,7 @@ public class ShallowEtagHeaderFilter extends OncePerRequestFilter { if (this.writer == null) { String characterEncoding = getCharacterEncoding(); this.writer = (characterEncoding != null ? new ResponsePrintWriter(characterEncoding) : - new ResponsePrintWriter()); + new ResponsePrintWriter(WebUtils.DEFAULT_CHARACTER_ENCODING)); } return this.writer; }