tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteResponse.java
Date Fri, 09 Aug 2002 16:23:26 GMT
patrickl    2002/08/09 09:23:25

  Modified:    coyote/src/java/org/apache/coyote Response.java
               coyote/src/java/org/apache/coyote/tomcat5
                        CoyoteResponse.java
  Log:
  In the Servlet 2.4 spec section 5.4 on i18n, the deployment descriptor gets new stuff for
mapping locale to character encoding.
  
  Revision  Changes    Path
  1.13      +4 -3      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
  
  Index: Response.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Response.java	1 Aug 2002 17:20:36 -0000	1.12
  +++ Response.java	9 Aug 2002 16:23:25 -0000	1.13
  @@ -455,8 +455,6 @@
           if (isCommitted())
               return;
   
  -        characterEncoding = charset;
  -
           String type = this.contentType;
           int start = type.indexOf("charset=");
           if ( start != -1 ) {
  @@ -468,8 +466,11 @@
                   type = type.substring(0,start+8)
                       +charset;
               this.contentType = type;
  -
  +        } else {
  +            type += "charset=" + charset;
           }
  +        setContentType( type );
  +        
       }
   
       public String getCharacterEncoding() {
  
  
  
  1.3       +10 -4     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CoyoteResponse.java	8 Aug 2002 04:08:41 -0000	1.2
  +++ CoyoteResponse.java	9 Aug 2002 16:23:25 -0000	1.3
  @@ -753,6 +753,12 @@
   
           coyoteResponse.setLocale(locale);
   
  +        CharsetMapper cm = context.getCharsetMapper();
  +        String charset = cm.getCharset( locale );
  +
  +        if ( charset != null )
  +            setCharacterEncoding( charset);
  +
       }
   
   
  
  
  

--
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