~ubuntu-branches/ubuntu/trusty/tomcat7/trusty-security

« back to all changes in this revision

Viewing changes to java/org/apache/catalina/filters/SetCharacterEncodingFilter.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2012-06-07 22:43:21 UTC
  • mfrom: (11.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120607224321-cfev8j681yueyov3
Tags: 7.0.27-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 * and <code>User-Agent</code> headers, or a value stashed in the current
53
53
 * user's session.</p>
54
54
 */
55
 
 
56
55
public class SetCharacterEncodingFilter extends FilterBase {
57
56
 
58
57
    private static final Log log =
100
99
        // Conditionally select and set the character encoding to be used
101
100
        if (ignore || (request.getCharacterEncoding() == null)) {
102
101
            String characterEncoding = selectEncoding(request);
103
 
            if (characterEncoding != null)
 
102
            if (characterEncoding != null) {
104
103
                request.setCharacterEncoding(characterEncoding);
 
104
            }
105
105
        }
106
106
 
107
107
        // Pass control on to the next filter