tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationHttpResponse.java
Date Fri, 28 Jun 2002 12:19:13 GMT
remm        2002/06/28 05:19:13

  Modified:    catalina/src/share/org/apache/catalina/core
                        ApplicationHttpResponse.java
  Log:
  - Disallow setLocale from an included servlet.
  - Patch submitted by Arvind Srinivasan <arvind.srinivasan at sun.com>
  
  Revision  Changes    Path
  1.8       +18 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java
  
  Index: ApplicationHttpResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationHttpResponse.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ApplicationHttpResponse.java	23 May 2002 07:13:45 -0000	1.7
  +++ ApplicationHttpResponse.java	28 Jun 2002 12:19:13 -0000	1.8
  @@ -66,6 +66,7 @@
   
   
   import java.io.IOException;
  +import java.util.Locale;
   import javax.servlet.http.Cookie;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpServletResponseWrapper;
  @@ -187,6 +188,19 @@
   
           if (!included)
               getResponse().setContentType(type);
  +
  +    }
  +
  +
  +    /**
  +     * Disallow <code>setLocale()</code> calls on an included response.
  +     *
  +     * @param loc The new locale
  +     */
  +    public void setLocale(Locale loc) {
  +
  +        if (!included)
  +            getResponse().setLocale(loc);
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message