git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@751313
13f79535-47bb-0310-9956-
ffa450edef68
if (included)
return;
- // Ignore any call made after the getWriter has been invoked
- // The default should be used
- if (usingWriter)
+ // Normally calls to this method after the getWriter has been invoked
+ // will be ignored. The exception allows the addDefaultCharsetValve to
+ // insert the default charset in appropriate circumstances
+ if (usingWriter && (isCharacterEncodingSet ||
+ !getCharacterEncoding().equalsIgnoreCase(charset)))
return;
coyoteResponse.setCharacterEncoding(charset);