소스 검색

SEC-835: use setContentType on response for J2EE 1.3 compatibility.

Luke Taylor 17 년 전
부모
커밋
25ba269db0
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      core/src/main/java/org/springframework/security/ui/webapp/DefaultLoginPageGeneratingFilter.java

+ 1 - 2
core/src/main/java/org/springframework/security/ui/webapp/DefaultLoginPageGeneratingFilter.java

@@ -76,8 +76,7 @@ public class DefaultLoginPageGeneratingFilter extends SpringSecurityFilter {
     protected void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
         if (isLoginUrlRequest(request)) {
             String loginPageHtml = generateLoginPageHtml(request);
-            response.setCharacterEncoding("UTF-8");
-            response.setContentType("text/html");
+            response.setContentType("text/html;charset=UTF-8");
             response.setContentLength(loginPageHtml.length());
             response.getOutputStream().print(loginPageHtml);