Using correct encoding (ISO-8859-1) instead of JVM default when no character encoding is given.
This commit is contained in:
parent
7c6ea9b80d
commit
dc59ca427c
|
|
@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponseWrapper;
|
||||||
|
|
||||||
import org.springframework.util.FileCopyUtils;
|
import org.springframework.util.FileCopyUtils;
|
||||||
import org.springframework.util.Md5HashUtils;
|
import org.springframework.util.Md5HashUtils;
|
||||||
|
import org.springframework.web.util.WebUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link javax.servlet.Filter} that generates an <code>ETag</code> value based on the content on the response. This
|
* {@link javax.servlet.Filter} that generates an <code>ETag</code> value based on the content on the response. This
|
||||||
|
|
@ -118,7 +119,7 @@ public class ShallowEtagHeaderFilter extends OncePerRequestFilter {
|
||||||
if (this.writer == null) {
|
if (this.writer == null) {
|
||||||
String characterEncoding = getCharacterEncoding();
|
String characterEncoding = getCharacterEncoding();
|
||||||
this.writer = (characterEncoding != null ? new ResponsePrintWriter(characterEncoding) :
|
this.writer = (characterEncoding != null ? new ResponsePrintWriter(characterEncoding) :
|
||||||
new ResponsePrintWriter());
|
new ResponsePrintWriter(WebUtils.DEFAULT_CHARACTER_ENCODING));
|
||||||
}
|
}
|
||||||
return this.writer;
|
return this.writer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue